@HashCodeAndEqualsPlugin.Enhance public static class AgentBuilder.CircularityLock.Global extends AgentBuilder.CircularityLock.WithInnerClassLoadingLock
AgentBuilder.CircularityLock.WithInnerClassLoadingLock.TrivialLockAgentBuilder.CircularityLock.Default, AgentBuilder.CircularityLock.Global, AgentBuilder.CircularityLock.Inactive, AgentBuilder.CircularityLock.WithInnerClassLoadingLockDEFAULT_SIZE| Constructor and Description |
|---|
Global()
Creates a new global circularity lock that does not wait for a release and a
default size for the amount of global locks.
|
Global(int size)
Creates a new global circularity lock that does not wait for a release.
|
Global(int size,
long time,
TimeUnit timeUnit)
Creates a new global circularity lock.
|
Global(long time,
TimeUnit timeUnit)
Creates a new global circularity lock with a default size for the amount of global locks.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doAcquire()
Acquires the actual lock for the current thread.
|
void |
release()
Releases the circularity lock if it is currently acquired.
|
acquirepublic Global()
public Global(long time,
TimeUnit timeUnit)
time - The time to wait for the lock.timeUnit - The time's time unit.public Global(int size)
size - The amount of locks used in parallel or 0 if no global locks should be used.public Global(int size,
long time,
TimeUnit timeUnit)
size - The amount of locks used in parallel or 0 if no global locks should be used.time - The time to wait for the lock.timeUnit - The time's time unit.protected boolean doAcquire()
AgentBuilder.CircularityLock.WithInnerClassLoadingLockdoAcquire in class AgentBuilder.CircularityLock.WithInnerClassLoadingLocktrue if the lock was acquired successfully, false if it is already hold.public void release()
Copyright © 2014–2025. All rights reserved.