Class SyncReplPolicy
java.lang.Object
com.gigaspaces.cluster.replication.sync.SyncReplPolicy
- All Implemented Interfaces:
SmartExternalizable,Externalizable,Serializable
This class contains all configuration information about Synchronize Replication.
- Version:
- 4.0
- Author:
- Igor Goldenberg
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final longstatic final longstatic final ConsistencyLevelstatic final Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final longstatic final longstatic final booleanstatic final longstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor for externalizable.SyncReplPolicy(String nodeName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionlonglonglonggetDump()Debug dump info.intintintintintintintlonglonglongintintbooleanbooleanbooleanvoidvoidsetAdaptiveMulticast(boolean isAdaptive) iftruemulticast protocol will be adopted with TCP/IP.voidsetAsyncOneWayHeartBeatInterval(long heartBeatIntervalTime) voidsetConsistencyLevel(ConsistencyLevel consistencyLevel) voidsetHoldTxnLockUntilSyncReplication(boolean isHoldTxnLock) Set sync-replication mode under transactions.voidsetMaxThrottleTPWhenInactive(int maxThrottleTPWhenInactive) voidsetMinThrottleTPWhenActive(int minThrottleTPWhenActive) voidsetMulticastIpGroup(String multicastIpGroup) voidsetMulticastMaxThreadPoolSize(int multicastMaxThreadPoolSize) voidsetMulticastMinThreadPoolSize(int multicastMinThreadPoolSize) voidsetMulticastPort(int multicastPort) voidsetMulticastTTL(int timeToLeave) voidsetMultipleOperationChunkSize(int chunkSmultipleOperChunkSizeize) voidsetNodeName(String nodeName) voidsetTargetConsumeTimeout(long targetConsumeTimeout) voidsetThrottleWhenInactive(boolean throttleWhenInactive) voidsetTodoQueueTimeout(long todoQueueTimeout) Set todoQueue timeout.voidsetUnicastMaxThreadPoolSize(int unicastMaxThreadPoolSize) voidsetUnicastMinThreadPoolSize(int unicastMinThreadPoolSize) 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_IP_GROUP
- See Also:
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
DEFAULT_MULTICAST_TTL
public static final int DEFAULT_MULTICAST_TTL- See Also:
-
DEFAULT_TODO_QUEUE_TIMEOUT
public static final long DEFAULT_TODO_QUEUE_TIMEOUT- See Also:
-
DEFAULT_ASYNC_INTERVAL_TO_CHECK
public static final long DEFAULT_ASYNC_INTERVAL_TO_CHECK- See Also:
-
DEFAULT_RESPONSE_TIMEOUT
public static final long DEFAULT_RESPONSE_TIMEOUT- See Also:
-
DEFAULT_ACK_INTERVAL
public static final long DEFAULT_ACK_INTERVAL- See Also:
-
DEFAULT_ASYNC_ONE_WAY_HEARTBEAT_INTERVAL
public static final long DEFAULT_ASYNC_ONE_WAY_HEARTBEAT_INTERVAL- See Also:
-
DEFAULT_UNICAST_MIN_WORK_THREADS
public static final int DEFAULT_UNICAST_MIN_WORK_THREADS- See Also:
-
DEFAULT_UNICAST_MAX_WORK_THREADS
public static final int DEFAULT_UNICAST_MAX_WORK_THREADS- See Also:
-
DEFAULT_MULTICAST_MIN_WORK_THREADS
public static final int DEFAULT_MULTICAST_MIN_WORK_THREADS- See Also:
-
DEFAULT_MULTICAST_MAX_WORK_THREADS
public static final int DEFAULT_MULTICAST_MAX_WORK_THREADS- See Also:
-
DEFAULT_MULTIPLE_OPERATION_CHUNK_SIZE
public static final int DEFAULT_MULTIPLE_OPERATION_CHUNK_SIZE- See Also:
-
DEFAULT_THROTTLE_WHEN_INACTIVE
public static final boolean DEFAULT_THROTTLE_WHEN_INACTIVE- See Also:
-
DEFAULT_MAX_THROTTLE_TP_WHEN_INACTIVE
public static final int DEFAULT_MAX_THROTTLE_TP_WHEN_INACTIVE- See Also:
-
DEFAULT_MIN_THROTTLE_TP_WHEN_ACTIVE
public static final int DEFAULT_MIN_THROTTLE_TP_WHEN_ACTIVE- See Also:
-
DEFAULT_TARGET_CONSUME_TIMEOUT
public static final long DEFAULT_TARGET_CONSUME_TIMEOUT- See Also:
-
DEFAULT_CONSISTENCY_LEVEL
-
nodeName
-
-
Constructor Details
-
SyncReplPolicy
public SyncReplPolicy()Empty constructor for externalizable. Should not be used for other purposes. -
SyncReplPolicy
Constructor.- Parameters:
nodeNameThe- name of node.
-
-
Method Details
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
isHoldTxnLockUntilSyncReplication
public boolean isHoldTxnLockUntilSyncReplication()- Returns:
- if
truehold transaction lock until sync replication will be finished.
-
setHoldTxnLockUntilSyncReplication
public void setHoldTxnLockUntilSyncReplication(boolean isHoldTxnLock) Set sync-replication mode under transactions.- Parameters:
isHoldTxnLock- Iftrueholds transaction lock until sync-replication will be finished. NOTE: If true, may cause to the distributed sync-replication dead-locks. Use only if special cases.
-
setAsyncOneWayHeartBeatInterval
public void setAsyncOneWayHeartBeatInterval(long heartBeatIntervalTime) -
getAsyncOneWayHeartBeatInterval
public long getAsyncOneWayHeartBeatInterval() -
getAsyncIntervalToCheck
public long getAsyncIntervalToCheck()- Returns:
- Returns the asyncIntervalToCheck.
-
getMulticastIpGroup
-
getMulticastPort
public int getMulticastPort() -
getMulticastTTL
public int getMulticastTTL() -
setMulticastTTL
public void setMulticastTTL(int timeToLeave) -
setNodeName
- Parameters:
nodeName- The nodeName to set.
-
getNodeName
-
getMulticastMaxThreadPoolSize
public int getMulticastMaxThreadPoolSize()- Returns:
- Returns the multicastMaxThreadPoolSize.
-
setMulticastMaxThreadPoolSize
public void setMulticastMaxThreadPoolSize(int multicastMaxThreadPoolSize) - Parameters:
multicastMaxThreadPoolSize- The multicastMaxThreadPoolSize to set.
-
getMulticastMinThreadPoolSize
public int getMulticastMinThreadPoolSize()- Returns:
- Returns the multicastMinThreadPoolSize.
-
setMulticastMinThreadPoolSize
public void setMulticastMinThreadPoolSize(int multicastMinThreadPoolSize) - Parameters:
multicastMinThreadPoolSize- The multicastMinThreadPoolSize to set.
-
getResponseTimeout
public long getResponseTimeout()- Returns:
- Returns the responseTimeout.
-
getTodoQueueTimeout
public long getTodoQueueTimeout()- Returns:
- Returns the todoQueueTimeout.
-
setTodoQueueTimeout
public void setTodoQueueTimeout(long todoQueueTimeout) Set todoQueue timeout. According this time calculate: responseTimeout and ackIntervalTime time. responseTimeout = todoQueueTimeout + (long)( todoQueueTimeout * 0.3 ); ackIntervalTime = todoQueueTimeout / 2; Multicast Sync replication- Parameters:
todoQueueTimeout- The todoQueueTimeout to set.
-
setAdaptiveMulticast
public void setAdaptiveMulticast(boolean isAdaptive) iftruemulticast protocol will be adopted with TCP/IP. Adoptive binary algorithm will find an max event size threshold for multicast packet. if the multicast packet is greater that max threashold this packet packet will be sent by TCP/IP.- Parameters:
isAdaptive- isAdaptive multicast.
-
isAdaptiveMulticast
public boolean isAdaptiveMulticast() -
getUnicastMaxThreadPoolSize
public int getUnicastMaxThreadPoolSize()- Returns:
- Returns the unicastMaxThreadPoolSize.
-
setUnicastMaxThreadPoolSize
public void setUnicastMaxThreadPoolSize(int unicastMaxThreadPoolSize) - Parameters:
unicastMaxThreadPoolSize- The unicastMaxThreadPoolSize to set.
-
getUnicastMinThreadPoolSize
public int getUnicastMinThreadPoolSize()- Returns:
- Returns the unicastMinThreadPoolSize.
-
setUnicastMinThreadPoolSize
public void setUnicastMinThreadPoolSize(int unicastMinThreadPoolSize) - Parameters:
unicastMinThreadPoolSize- The unicastMinThreadPoolSize to set.
-
getAckIntervalTime
public long getAckIntervalTime()- Returns:
- The ackIntervalTime.
-
setMulticastIpGroup
- Parameters:
multicastIpGroup- The multicastIpGroup to set.
-
setMulticastPort
public void setMulticastPort(int multicastPort) - Parameters:
multicastPort- The multicastPort to set.
-
setMultipleOperationChunkSize
public void setMultipleOperationChunkSize(int chunkSmultipleOperChunkSizeize) - Parameters:
chunkSize- maximum operations chunk size, or -1 if chunk mechanism disabled.
-
getMultipleOperationChunkSize
public int getMultipleOperationChunkSize()- Returns:
- the defined maximum chunk for multiple operations, or -1 if chunk mechanism disabled.
-
isThrottleWhenInactive
public boolean isThrottleWhenInactive() -
setThrottleWhenInactive
public void setThrottleWhenInactive(boolean throttleWhenInactive) -
getMaxThrottleTPWhenInactive
public int getMaxThrottleTPWhenInactive() -
setMaxThrottleTPWhenInactive
public void setMaxThrottleTPWhenInactive(int maxThrottleTPWhenInactive) -
getMinThrottleTPWhenActive
public int getMinThrottleTPWhenActive() -
setMinThrottleTPWhenActive
public void setMinThrottleTPWhenActive(int minThrottleTPWhenActive) -
getTargetConsumeTimeout
public long getTargetConsumeTimeout() -
setTargetConsumeTimeout
public void setTargetConsumeTimeout(long targetConsumeTimeout) -
getConsistencyLevel
-
setConsistencyLevel
-
getDump
Debug dump info. -
toString
-