Package com.hazelcast.config.cp
Class SemaphoreConfig
- java.lang.Object
-
- com.hazelcast.config.cp.SemaphoreConfig
-
public class SemaphoreConfig extends java.lang.Object
Contains configuration options for CPISemaphore
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_INITIAL_PERMITS
Default value for the initial permit count of Semaphores.static boolean
DEFAULT_SEMAPHORE_JDK_COMPATIBILITY
The default value for the JDK compatibility mode of CPISemaphore
-
Constructor Summary
Constructors Constructor Description SemaphoreConfig()
SemaphoreConfig(java.lang.String name)
SemaphoreConfig(java.lang.String name, boolean jdkCompatible, int initialPermits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getInitialPermits()
Returns initial permit count of the Semaphorejava.lang.String
getName()
Returns the name of CP ISemaphoreboolean
isJDKCompatible()
Returns true if CP ISemaphore is compatible with its JDK counterpartSemaphoreConfig
setInitialPermits(int initialPermits)
Sets initial permit count of the SemaphoreSemaphoreConfig
setJDKCompatible(boolean jdkCompatible)
Sets JDK compatibility mode of CP ISemaphoreSemaphoreConfig
setName(java.lang.String name)
Sets the name of CP ISemaphorejava.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT_SEMAPHORE_JDK_COMPATIBILITY
public static final boolean DEFAULT_SEMAPHORE_JDK_COMPATIBILITY
The default value for the JDK compatibility mode of CPISemaphore
- See Also:
- Constant Field Values
-
DEFAULT_INITIAL_PERMITS
public static final int DEFAULT_INITIAL_PERMITS
Default value for the initial permit count of Semaphores.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of CP ISemaphore
-
setName
public SemaphoreConfig setName(java.lang.String name)
Sets the name of CP ISemaphore
-
isJDKCompatible
public boolean isJDKCompatible()
Returns true if CP ISemaphore is compatible with its JDK counterpart
-
setJDKCompatible
public SemaphoreConfig setJDKCompatible(boolean jdkCompatible)
Sets JDK compatibility mode of CP ISemaphore
-
getInitialPermits
public int getInitialPermits()
Returns initial permit count of the Semaphore
-
setInitialPermits
public SemaphoreConfig setInitialPermits(int initialPermits)
Sets initial permit count of the Semaphore
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-