Package com.hazelcast.config.cp
Class FencedLockConfig
java.lang.Object
com.hazelcast.config.cp.FencedLockConfig
public class FencedLockConfig extends Object
Contains configuration options for
FencedLock
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_LOCK_ACQUIRE_LIMIT
The default reentrant lock acquire limit ofFencedLock
. -
Constructor Summary
Constructors Constructor Description FencedLockConfig()
FencedLockConfig(String name)
FencedLockConfig(String name, int lockAcquireLimit)
-
Method Summary
Modifier and Type Method Description FencedLockConfig
disableReentrancy()
Disable reentrancy.FencedLockConfig
enableReentrancy()
Enables reentrancy.int
getLockAcquireLimit()
Returns the maximum number of lock acquires a lock holder can perform.String
getName()
Returns the name of FencedLockFencedLockConfig
setLockAcquireLimit(int lockAcquireLimit)
Sets the number of lock acquires a lock holder can perform.FencedLockConfig
setName(String name)
Sets the name of FencedLockString
toString()
-
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:
- Constant Field Values
-
-
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
-