Class ActiveElectionConfig
java.lang.Object
com.gigaspaces.cluster.activeelection.core.ActiveElectionConfig
- All Implemented Interfaces:
SmartExternalizable,Externalizable,Serializable
This class provides a configuration object of
ActiveElectionManager.- Since:
- 6.0
- Author:
- Igor Goldenberg
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longfault detector configurationstatic final intstatic final longstatic final intstatic final longstatic final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongintlongString[]Get fault detection configurationlongintlongvoidvoidsetFaultDetectorInvocationDelay(long detectorInvocationDelay) Set amount of time in milliseconds to wait betweenIJSpace.ping()method invocations.voidsetFaultDetectorRetryCount(int detectorRetryCount) Set number of times to retry connecting to the service when invoking theIJSpace.ping()method.voidsetFaultDetectorRetryTimeout(long detectorRetryTimeout) Set how long to wait between retries (in milliseconds).voidsetResolutionTimeout(long resolutionTimeout) voidsetRetryConnection(int retryConnection) Set number of retry connections withINamingService, default naming service is LookupService.voidsetYieldTime(long yieldTime) Time to yield to other participants between every election phase(total 3) before acquire Primary or Backup state.toString()voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.gigaspaces.serialization.SmartExternalizable
enabledSmartExternalizableWithReference
-
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_DELAYfault 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
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
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 withINamingService, 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 betweenIJSpace.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 theIJSpace.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
Get fault detection configuration -
toString
-