Class SyncReplPolicy

java.lang.Object
com.gigaspaces.cluster.replication.sync.SyncReplPolicy
All Implemented Interfaces:
SmartExternalizable, Externalizable, Serializable

public class SyncReplPolicy extends Object implements SmartExternalizable
This class contains all configuration information about Synchronize Replication.
Version:
4.0
Author:
Igor Goldenberg
See Also:
  • Field Details

    • DEFAULT_IP_GROUP

      public static final String 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

      public static final ConsistencyLevel DEFAULT_CONSISTENCY_LEVEL
    • nodeName

      public String nodeName
  • Constructor Details

    • SyncReplPolicy

      public SyncReplPolicy()
      Empty constructor for externalizable. Should not be used for other purposes.
    • SyncReplPolicy

      public SyncReplPolicy(String nodeName)
      Constructor.
      Parameters:
      nodeNameThe - name of node.
  • 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
    • isHoldTxnLockUntilSyncReplication

      public boolean isHoldTxnLockUntilSyncReplication()
      Returns:
      if true hold transaction lock until sync replication will be finished.
    • setHoldTxnLockUntilSyncReplication

      public void setHoldTxnLockUntilSyncReplication(boolean isHoldTxnLock)
      Set sync-replication mode under transactions.
      Parameters:
      isHoldTxnLock - If true holds 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

      public String getMulticastIpGroup()
    • getMulticastPort

      public int getMulticastPort()
    • getMulticastTTL

      public int getMulticastTTL()
    • setMulticastTTL

      public void setMulticastTTL(int timeToLeave)
    • setNodeName

      public void setNodeName(String nodeName)
      Parameters:
      nodeName - The nodeName to set.
    • getNodeName

      public String 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)
      if true multicast 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

      public void setMulticastIpGroup(String multicastIpGroup)
      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

      public ConsistencyLevel getConsistencyLevel()
    • setConsistencyLevel

      public void setConsistencyLevel(ConsistencyLevel consistencyLevel)
    • getDump

      public String getDump()
      Debug dump info.
    • toString

      public String toString()
      Overrides:
      toString in class Object