| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private final ServiceLocatorImpl | |
| private final ReentrantLock | |
| private final Cache |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | containsKey(ActiveDescriptor<?> descriptor)
Implements org. Determines if this context has a value for the given key |
| public void | destroyOne(ActiveDescriptor<?>
The descriptor to release (may not be null). Further, the cache MUST be set one)Implements org. Release one system descriptor |
| public <T> T | findOrCreate(ActiveDescriptor<T> activeDescriptor, ServiceHandle<?> root)
Implements org. Creates a contextual instance of this ActiveDescriptor by calling its create method if there is no other matching contextual instance. |
| public Class | getScope()
Implements org. The scope for which this is the context |
| public boolean | isActive()
Implements org. True if this context is active, false otherwise |
| public void | |
| public boolean | supportsNullCreation()
Implements org. Returns true if the findOrCreate method can return null |
| generationNumber | back to summary |
|---|---|
| private int generationNumber | |
| locator | back to summary |
|---|---|
| private final ServiceLocatorImpl locator | |
| lock | back to summary |
|---|---|
| private final ReentrantLock lock | |
| valueCache | back to summary |
|---|---|
| private final Cache<ContextualInput<Object>, Object> valueCache | |
| SingletonContext | back to summary |
|---|---|
| pack-priv SingletonContext(ServiceLocatorImpl impl) | |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(ActiveDescriptor<?> descriptor) Implements org. Doc from org. Determines if this context has a value for the given key
| |
| destroyOne | back to summary |
|---|---|
| public void destroyOne(ActiveDescriptor<?> one) Implements org. Release one system descriptor
| |
| findOrCreate | back to summary |
|---|---|
| public <T> T findOrCreate(ActiveDescriptor<T> activeDescriptor, ServiceHandle<?> root) Implements org. Doc from org. Creates a contextual instance of this ActiveDescriptor by calling its create method if there is no other matching contextual instance. If there is already a contextual instance it is returned. If parent is null then this must work like the find call
| |
| getScope | back to summary |
|---|---|
| public Class Implements org. Doc from org. The scope for which this is the context
| |
| isActive | back to summary |
|---|---|
| public boolean isActive() Implements org. Doc from org. True if this context is active, false otherwise
| |
| shutdown | back to summary |
|---|---|
| public void shutdown() Implements org. Doc from org. Shut down this context.
| |
| supportsNullCreation | back to summary |
|---|---|
| public boolean supportsNullCreation() Implements org. Doc from org. Returns true if the findOrCreate method can return null
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
For serialization |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(SystemDescriptor<Object> o1, SystemDescriptor<Object> o2)
Implements java. Compares its two arguments for order. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID For serialization | |
| GenerationComparator | back to summary |
|---|---|
| private GenerationComparator() | |
| compare | back to summary |
|---|---|
| public int compare(SystemDescriptor<Object> o1, SystemDescriptor<Object> o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |