Package com.hazelcast.config.cp
Class FencedLockConfig
java.lang.Object
com.hazelcast.config.cp.FencedLockConfig
Contains configuration options for
FencedLock
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default reentrant lock acquire limit ofFencedLock
. 0 means there is no upper bound for number of reentrant lock acquires. -
Constructor Summary
ConstructorDescriptionFencedLockConfig
(String name) FencedLockConfig
(String name, int lockAcquireLimit) -
Method Summary
Modifier and TypeMethodDescriptionDisable reentrancy.Enables reentrancy.int
Returns the maximum number of lock acquires a lock holder can perform. 0 means no upper-bound on the number of reentrant lock acquires. 1 means the lock is non-reentrant.getName()
Returns the name of FencedLocksetLockAcquireLimit
(int lockAcquireLimit) Sets the number of lock acquires a lock holder can perform.Sets the name of FencedLocktoString()
-
Field Details
-
DEFAULT_LOCK_ACQUIRE_LIMIT
public static final int DEFAULT_LOCK_ACQUIRE_LIMITThe default reentrant lock acquire limit ofFencedLock
. 0 means there is no upper bound for number of reentrant lock acquires.- See Also:
-
-
Constructor Details
-
FencedLockConfig
public FencedLockConfig() -
FencedLockConfig
-
FencedLockConfig
-
-
Method Details
-
getName
Returns the name of FencedLock -
setName
Sets the name of FencedLock -
getLockAcquireLimit
public int getLockAcquireLimit()Returns the maximum number of lock acquires a lock holder can perform. 0 means no upper-bound on the number of reentrant lock acquires. 1 means the lock is non-reentrant. It can also be bigger than 1. -
setLockAcquireLimit
Sets the number of lock acquires a lock holder can perform. -
disableReentrancy
Disable reentrancy. It means once the lock is acquired, the caller will not be able to acquire it again before it releases the lock. -
enableReentrancy
Enables reentrancy. It means once the lock is acquired, the caller can acquire the lock again many times, without having an upper bound on the number of reentrant acquires. -
toString
-