Class ActiveElectionConfig

java.lang.Object
com.gigaspaces.cluster.activeelection.core.ActiveElectionConfig
All Implemented Interfaces:
SmartExternalizable, Externalizable, Serializable

public class ActiveElectionConfig extends Object implements SmartExternalizable
This class provides a configuration object of ActiveElectionManager.
Since:
6.0
Author:
Igor Goldenberg
See Also:
  • Field Details

    • DEFAULT_RETRY_COUNT

      public static final int DEFAULT_RETRY_COUNT
      See Also:
    • DEFAULT_YIELD_TIME

      public static final long DEFAULT_YIELD_TIME
      See Also:
    • RESOLUTION_TIMEOUT_DEFAULT

      public static final long RESOLUTION_TIMEOUT_DEFAULT
      See Also:
    • DEFAULT_FAULTDETECTOR_INVOCATION_DELAY

      public static final long DEFAULT_FAULTDETECTOR_INVOCATION_DELAY
      fault detector configuration
      See Also:
    • DEFAULT_FAULTDETECTOR_RETRY_COUNT

      public static final int DEFAULT_FAULTDETECTOR_RETRY_COUNT
      See Also:
    • DEFAULT_FAULTDETECTOR_RETRY_TIMEOUT

      public static final long DEFAULT_FAULTDETECTOR_RETRY_TIMEOUT
      See Also:
  • Constructor Details

    • ActiveElectionConfig

      public ActiveElectionConfig()
  • Method Details

    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Specified by:
      writeExternal in interface Externalizable
      Throws:
      IOException
    • readExternal

      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      Specified by:
      readExternal in interface Externalizable
      Throws:
      IOException
      ClassNotFoundException
    • getRetryConnection

      public int getRetryConnection()
      Returns:
      number of retry connections with INamingService, default naming service is LookupService.
    • getYieldTime

      public long getYieldTime()
      Returns:
      yield time between every election phase.
    • setRetryConnection

      public void setRetryConnection(int retryConnection)
      Set number of retry connections with INamingService, default naming service is LookupService.
      Parameters:
      retryConnection - number of retry connections.
    • setYieldTime

      public void setYieldTime(long yieldTime)
      Time to yield to other participants between every election phase(total 3) before acquire Primary or Backup state.
      Parameters:
      yieldTime - time in milliseconds.
    • getFaultDetectorInvocationDelay

      public long getFaultDetectorInvocationDelay()
      Returns:
      The amount of time in milliseconds to wait between IJSpace.ping() method invocations.
    • setFaultDetectorInvocationDelay

      public void setFaultDetectorInvocationDelay(long detectorInvocationDelay)
      Set amount of time in milliseconds to wait between IJSpace.ping() method invocations.
      Parameters:
      detectorInvocationDelay - delay time in ms.
    • getFaultDetectorRetryCount

      public int getFaultDetectorRetryCount()
      Returns:
      the number of times to retry connecting to the service when invoking the IJSpace.ping() method. If the service cannot be reached within the retry count specified the service will be determined to be unreachable.
    • setFaultDetectorRetryCount

      public void setFaultDetectorRetryCount(int detectorRetryCount)
      Set number of times to retry connecting to the service when invoking the IJSpace.ping() method. If the service cannot be reached within the retry count specified the service will be determined to be unreachable.
      Parameters:
      detectorRetryCount - connection retry count.
    • getFaultDetectorRetryTimeout

      public long getFaultDetectorRetryTimeout()
      Returns:
      How long to wait between retries (in milliseconds). This value will be used between retry attempts, waiting the specified amount of time to retry.
    • setFaultDetectorRetryTimeout

      public void setFaultDetectorRetryTimeout(long detectorRetryTimeout)
      Set how long to wait between retries (in milliseconds). This value will be used between retry attempts, waiting the specified amount of time to retry.
      Parameters:
      detectorRetryTimeout - retry timeout in ms.
    • getResolutionTimeout

      public long getResolutionTimeout()
    • setResolutionTimeout

      public void setResolutionTimeout(long resolutionTimeout)
    • getFDHConfig

      public String[] getFDHConfig()
      Get fault detection configuration
    • toString

      public String toString()
      Overrides:
      toString in class Object