| Modifier and Type | Field and Description |
|---|---|
| private static final JavaLangAccess | |
| private final Thread | |
| private volatile StackableScope |
| Access | Constructor and Description |
|---|---|
| pack-priv | StackableScope(boolean
true for a shared scope that cannot be pushed to the stack,
false for scope that is owned by the current thread shared)Creates a stackable scope. |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | contains(StackableScope scope)
Returns true if the given scope is on the current thread's scope stack. |
| public StackableScope | |
| public <T extends StackableScope> T | |
| pack-priv static StackableScope | |
| private StackableScope | |
| public Thread | |
| public static void | |
| public boolean | Returns: true if this scope was at the top of the stack, otherwise falsePops this scope from the current thread's scope stack. |
| pack-priv StackableScope | |
| public StackableScope | |
| private static void | |
| protected boolean | Returns: true if this method closed the scope, false if it failedOverride this method to close this scope and release its resources. |
| public boolean | Returns: true if the pop succeeded, false if this scope is not the top of stackPops this scope from the current thread's scope stack if the scope is at the top of stack. |
| private void |
| JLA | back to summary |
|---|---|
| private static final JavaLangAccess JLA | |
| owner | back to summary |
|---|---|
| private final Thread owner | |
| previous | back to summary |
|---|---|
| private volatile StackableScope previous | |
| StackableScope | back to summary |
|---|---|
| pack-priv StackableScope(boolean shared) Creates a stackable scope.
| |
| StackableScope | back to summary |
|---|---|
| protected StackableScope() Creates a stackable scope owned by the current thread. | |
| contains | back to summary |
|---|---|
| private static boolean contains(StackableScope scope) Returns true if the given scope is on the current thread's scope stack. | |
| enclosingScope | back to summary |
|---|---|
| public StackableScope enclosingScope() Returns the scope that encloses this scope. | |
| enclosingScope | back to summary |
|---|---|
| public <T extends StackableScope> T enclosingScope(Class<T> type) Returns the scope of the given type that encloses this scope. | |
| head | back to summary |
|---|---|
| pack-priv static StackableScope head() Returns the head of the current thread's scope stack. | |
| next | back to summary |
|---|---|
| private StackableScope next() Returns the scope that this scope directly encloses, null if none. | |
| owner | back to summary |
|---|---|
| public Thread owner() Returns the scope owner or null if not owned. | |
| popAll | back to summary |
|---|---|
| public static void popAll() Pops all scopes from the current thread's scope stack. | |
| popForcefully | back to summary |
|---|---|
| public boolean popForcefully() Pops this scope from the current thread's scope stack.
For well-behaved usages, this scope is at the top of the stack. It is popped
from the stack and the method returns
| |
| previous | back to summary |
|---|---|
| pack-priv StackableScope previous() Returns the scope that directly encloses this scope, null if none. | |
| push | back to summary |
|---|---|
| public StackableScope push() Pushes this scope onto the current thread's scope stack.
| |
| setHead | back to summary |
|---|---|
| private static void setHead(StackableScope scope) Sets the head (top) of the current thread's scope stack. | |
| tryClose | back to summary |
|---|---|
| protected boolean tryClose() Override this method to close this scope and release its resources. This method should not pop the scope from the stack. This method is guaranteed to execute on the owner thread.
| |
| tryPop | back to summary |
|---|---|
| public boolean tryPop() Pops this scope from the current thread's scope stack if the scope is at the top of stack.
| |
| unlink | back to summary |
|---|---|
| private void unlink() Removes this scope from the current thread's scope stack. | |