public static class AgentBuilder.CircularityLock.Default extends AgentBuilder.CircularityLock.WithInnerClassLoadingLock
AgentBuilder.CircularityLock.WithInnerClassLoadingLock.TrivialLock
AgentBuilder.CircularityLock.Default, AgentBuilder.CircularityLock.Global, AgentBuilder.CircularityLock.Inactive, AgentBuilder.CircularityLock.WithInnerClassLoadingLock
DEFAULT_SIZE
Constructor and Description |
---|
Default()
Creates a default lock with a default size for the amount of global locks.
|
Default(int size)
Creates a default lock with the supplied number of global locks.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
doAcquire()
Acquires the actual lock for the current thread.
|
protected boolean |
isLocked()
Returns
true if the current thread is currently locked. |
void |
release()
Releases the circularity lock if it is currently acquired.
|
acquire
public Default()
public Default(int size)
size
- The amount of locks used in parallel or 0
if no global locks should be used.protected boolean doAcquire()
AgentBuilder.CircularityLock.WithInnerClassLoadingLock
doAcquire
in class AgentBuilder.CircularityLock.WithInnerClassLoadingLock
true
if the lock was acquired successfully, false
if it is already hold.public void release()
protected boolean isLocked()
true
if the current thread is currently locked.true
if the current thread is currently locked.Copyright © 2014–2024. All rights reserved.