org.exoplatform.container.context
Class SharedContext<K>
java.lang.Object
org.exoplatform.container.context.AbstractContext<K>
org.exoplatform.container.context.SharedContext<K>
- All Implemented Interfaces:
- javax.enterprise.context.spi.Context, ThreadContextHolder, AdvancedContext<K>
- Direct Known Subclasses:
- SessionContext
public abstract class SharedContext<K>
- extends AbstractContext<K>
This is the root class of all the shared contexts, it relies on a ConcurrentMap
- Version:
- $Id$
- Author:
- Nicolas Filotto
|
Method Summary |
protected Lock |
getLock(String id)
In case the context is sharable, we will need a lock to synchronize the accesses |
protected boolean |
isSharable()
Indicates whether the objects of the context that can shared or not. |
| Methods inherited from class org.exoplatform.container.context.AbstractContext |
activate, createStorage, deactivate, destroy, destroy, destroy, get, get, getId, getInstance, getStorage, getThreadContext, isActive, register, setStorage, unregister |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.enterprise.context.spi.Context |
getScope |
SharedContext
public SharedContext()
isSharable
protected final boolean isSharable()
- Indicates whether the objects of the context that can shared or not. sharable
- Specified by:
isSharable in class AbstractContext<K>
- Returns:
true if the components are sharable, false otherwise.
getLock
protected Lock getLock(String id)
- In case the context is sharable, we will need a lock to synchronize the accesses
- Specified by:
getLock in class AbstractContext<K>
- Parameters:
id - the id of the contextual for which we want a lock
- Returns:
- a lock corresponding to the given contextual within the current context
Copyright © 2014 eXo Platform SAS. All Rights Reserved.