Class SemaphoreConfig


  • public class SemaphoreConfig
    extends java.lang.Object
    Contains configuration options for CP ISemaphore
    • Field Detail

      • DEFAULT_SEMAPHORE_JDK_COMPATIBILITY

        public static final boolean DEFAULT_SEMAPHORE_JDK_COMPATIBILITY
        The default value for the JDK compatibility mode of CP ISemaphore
        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
    • Constructor Detail

      • SemaphoreConfig

        public SemaphoreConfig()
      • SemaphoreConfig

        public SemaphoreConfig​(java.lang.String name)
      • SemaphoreConfig

        public SemaphoreConfig​(java.lang.String name,
                               boolean jdkCompatible,
                               int initialPermits)
    • 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 class java.lang.Object