public class ReplicationPolicy extends Object implements Serializable, Externalizable
Modifier and Type | Class and Description |
---|---|
static class |
ReplicationPolicy.ReplicationPolicyDescription
Replication policy description for every member.
|
Constructor and Description |
---|
ReplicationPolicy()
Just for Externalizable.
|
ReplicationPolicy(String clusterName,
String replicationGroupName,
List<String> replicationGroupMembersNames,
List<SpaceURL> replicationGroupMembersURLs,
String ownMemberName,
Hashtable<String,ReplicationPolicy.ReplicationPolicyDescription> replMemberPolicyDescTable,
com.gigaspaces.cluster.replication.sync.SyncReplPolicy syncReplPolicy,
com.gigaspaces.internal.cluster.node.impl.config.MultiBucketReplicationPolicy multiBucketReplicationPolicy,
com.j_spaces.core.cluster.SwapBacklogConfig swapRedologPolicy) |
Modifier and Type | Method and Description |
---|---|
long |
getAsyncChannelShutdownTimeout() |
com.j_spaces.core.cluster.ConflictingOperationPolicy |
getConflictingOperationPolicy() |
int |
getConnectionMonitorThreadPoolSize() |
long |
getDurableNotificationMaxDisconnectionTime() |
long |
getDurableNotificationMaxRedologCapacity() |
com.gigaspaces.internal.cluster.node.impl.gateway.GatewaysPolicy |
getGatewaysPolicy() |
long |
getLocalViewMaxDisconnectionTime() |
long |
getLocalViewMaxRedologCapacity() |
long |
getLocalViewMaxRedologRecoveryCapacity() |
long |
getMaxRedoLogCapacity() |
long |
getMaxRedoLogMemoryCapacity() |
long |
getMaxRedoLogRecoveryCapacity() |
com.gigaspaces.cluster.replication.MirrorServiceConfig |
getMirrorServiceConfig() |
com.gigaspaces.internal.cluster.node.impl.config.MultiBucketReplicationPolicy |
getMultiBucketReplicationPolicy() |
com.j_spaces.core.cluster.MissingPacketsPolicy |
getOnMissingPackets() |
com.j_spaces.core.cluster.RedoLogCapacityExceededPolicy |
getOnRedoLogCapacityExceeded() |
com.gigaspaces.cluster.activeelection.PrimarySpaceSelector |
getPrimarySpaceSelector() |
List<SpaceURL> |
getPrimaryTargets(List<String> excludeTargets)
Returns a list of URLs or an empty list of primary targets .
|
com.j_spaces.core.cluster.ReplicationProcessingType |
getProcessingType() |
List<SpaceURL> |
getRecoverableTargets(List<String> excludeTargets)
Finds all the recovery targets in cluster.
|
int |
getRecoveryChunkSize() |
int |
getRecoveryThreadPoolSize() |
long |
getReliableAsyncCompletionNotifierInterval() |
long |
getReliableAsyncCompletionNotifierPacketsThreshold() |
int |
getReplicationTargetsCount() |
int |
getSpaceMemberPosition(String spaceMemberName)
This method returns the relative position of the specified space member
in the replication group, or -1 if the space member is not found.
|
SpaceURL |
getSpaceReplicationUrl(String fullSpaceName) |
com.j_spaces.core.cluster.SwapBacklogConfig |
getSwapRedologPolicy() |
List<SpaceURL> |
getSyncTargets(List<String> excludeTargets)
Returns a list of URLs or an empty list of reliable targets to recover
from.
|
boolean |
hasReplicationGateways() |
boolean |
isFullReplication() |
boolean |
isMirrorServiceEnabled() |
boolean |
isOwnerMemberHasSyncReplication()
returns
true if this member has sync-replication to at least one target. |
boolean |
isReliableAsyncRepl() |
boolean |
isReplicateFullTake() |
boolean |
isReplicateLeaseExpirations() |
boolean |
isReplicateOnePhaseCommit() |
boolean |
isReplicateOriginalState() |
void |
readExternal(ObjectInput in) |
void |
setAsyncChannelShutdownTimeout(long shutdownTimeout) |
void |
setConflictingOperationPolicy(com.j_spaces.core.cluster.ConflictingOperationPolicy conflictingOperationPolicy) |
void |
setConnectionMonitorThreadPoolSize(int connectionMonitorThreadPoolSize) |
void |
setDurableNotificationMaxDisconnectionTime(long notificationMaxDisconnectionTime) |
void |
setDurableNotificationMaxRedologCapacity(Long notificationMaxRedologCapacity) |
void |
setGatewaysPolicy(com.gigaspaces.internal.cluster.node.impl.gateway.GatewaysPolicy gatewaysPolicy) |
void |
setLocalViewMaxDisconnectionTime(long localViewMaxDisconnectionTime) |
void |
setLocalViewMaxRedologCapacity(Long localViewMaxRedologCapacity) |
void |
setLocalViewMaxRedologRecoveryCapacity(Long localViewMaxRedologRecoveryCapacity) |
void |
setMaxRedoLogCapacity(long capacity) |
void |
setMaxRedoLogMemoryCapacity(long capacity) |
void |
setMaxRedoLogRecoveryCapacity(long capacity) |
void |
setMirrorServiceConfig(com.gigaspaces.cluster.replication.MirrorServiceConfig mirrorServiceConfig) |
void |
setOnMissingPackets(com.j_spaces.core.cluster.MissingPacketsPolicy onMissingPackets) |
void |
setOnRedoLogCapacityExceeded(com.j_spaces.core.cluster.RedoLogCapacityExceededPolicy policy) |
void |
setPermittedOperations(List<ReplicationOperationType> permittedOperations) |
void |
setPrimarySpaceSelector(com.gigaspaces.cluster.activeelection.PrimarySpaceSelector primarySpaceSelector) |
void |
setProcessingType(com.j_spaces.core.cluster.ReplicationProcessingType processingType) |
void |
setRecoveryChunkSize(int recoveryChunkSize) |
void |
setRecoveryThreadPoolSize(int recoveryThreadPoolSize) |
void |
setReliableAsyncCompletionNotifierInterval(long reliableAsyncCompletionNotifierInterval) |
void |
setReliableAsyncCompletionNotifierPacketsThreshold(long reliableAsyncCompletionNotifierPacketsThreshold) |
void |
setReliableAsyncRepl(boolean reliableAsyncRepl)
Sets the async-replication 'reliable' indicator; default false
|
void |
setReplicatedOriginalState(boolean isReplOriginalState) |
void |
setReplicateFullTake(boolean replicateFullTake) |
void |
setReplicateLeaseExpirations(boolean value) |
void |
setReplicateOnePhaseCommit(boolean replicateOnePhaseCommit) |
boolean |
shouldReplicate(ReplicationOperationType operType) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public static final String UNICAST_COMMUNICATION_MODE
public static final String MULTICAST_COMMUNICATION_MODE
public static final int UNICAST
public static final int MULTICAST
public static final String ASYNC_REPLICATION_MODE
public static final String SYNC_REPLICATION_MODE
public static final String SYNC_REC_ACK_REPLICATION_MODE
public static final String BLOCK_OPERATIONS_MODE
public static final String DROP_OLDEST_MODE
public static final String RECOVER_MODE
public static final String IGNORE_MODE
public static final String GLOBAL_ORDER_MODE
public static final String MULTI_BUCKET_MODE
public static final String MULTI_SOURCE_MODE
public static final int FULL_REPLICATION
public static final int PARTIAL_REPLICATION
public static final String DEFAULT_REPL_ORIGINAL_STATE
public static final int DEFAULT_REPL_CHUNK_SIZE
public static final int DEFAULT_REPL_INTERVAL_MILLIS
public static final int DEFAULT_REPL_INTERVAL_OPERS
public static final int DEFAULT_REPL_SPACE_FINDER_TIMEOUT
public static final int DEFAULT_REPL_SPACE_FINDER_REPORT_INTERVAL
public static final int DEFAULT_SYNC_ON_COMMIT_TIMEOUT
public static final long DEFAULT_ASYNC_CHANNEL_SHUTDOWN_TIMEOUT
public static final long DEFAULT_MAX_REDO_LOG_CPACITY
public static final com.j_spaces.core.cluster.RedoLogCapacityExceededPolicy DEFAULT_REDO_LOG_CAPACITY_EXCEEDED
public static final int DEFAULT_RECOVERY_CHUNK_SIZE
public static final int DEFAULT_RECOVERY_THREAD_POOL_SIZE
public static final int DEFAULT_BLOBSTORE_RECOVERY_THREAD_POOL_SIZE
public static final com.j_spaces.core.cluster.MissingPacketsPolicy DEFAULT_MISSING_PACKETS
public static final boolean DEFAULT_REPL_FULL_TAKE
public static final boolean DEFAULT_OLD_MODULE
public static final com.j_spaces.core.cluster.ReplicationProcessingType DEFAULT_PROCESSING_TYPE
public static final long DEFAULT_LOCALVIEW_REDOLOG_CAPACITY
public static final long DEFAULT_LOCALVIEW_MAX_DISCONNECTION_TIME
public static final long DEFAULT_LOCALVIEW_REDOLOG_RECOVERY_CAPACITY
public static final long DEFAULT_DURABLE_NOTIFICATION_REDOLOG_CAPACITY
public static final long DEFAULT_DURABLE_NOTIFICATION_MAX_DISCONNECTION_TIME
public static final long DEFAULT_RELIABLE_ASYNC_STATE_NOTIFY_INTERVAL
public static final long DEFAULT_RELIABLE_ASYNC_STATE_NOTIFY_PACKETS
public static final boolean DEFAULT_REPLICATE_ONE_PHASE_COMMIT
public static final int DEFAULT_CONNECTION_MONITOR_THREAD_POOL_SIZE
public String m_OwnMemberName
public String m_ReplicationGroupName
public boolean m_ReplicateNotifyTemplates
public boolean m_TriggerNotifyTemplates
public boolean m_SyncOnCommit
public String m_ReplicationMode
public int m_PolicyType
public int m_ReplicationChunkSize
public long m_ReplicationIntervalMillis
public int m_ReplicationIntervalOperations
public long m_SpaceFinderTimeout
public long m_SpaceFinderReportInterval
public long m_SyncOnCommitTimeout
public boolean m_Recovery
public Hashtable<String,ReplicationPolicy.ReplicationPolicyDescription> m_ReplMemberPolicyDescTable
public boolean isOneWayReplication
public boolean m_IsSyncReplicationEnabled
public com.gigaspaces.cluster.replication.sync.SyncReplPolicy m_SyncReplPolicy
public String clusterName
public static final String DEFAULT_MIRROR_SERVICE_NAME
public static final String DEFAULT_MIRROR_SERVICE_CONNECTOR_NAME
public ReplicationPolicy()
public ReplicationPolicy(String clusterName, String replicationGroupName, List<String> replicationGroupMembersNames, List<SpaceURL> replicationGroupMembersURLs, String ownMemberName, Hashtable<String,ReplicationPolicy.ReplicationPolicyDescription> replMemberPolicyDescTable, com.gigaspaces.cluster.replication.sync.SyncReplPolicy syncReplPolicy, com.gigaspaces.internal.cluster.node.impl.config.MultiBucketReplicationPolicy multiBucketReplicationPolicy, com.j_spaces.core.cluster.SwapBacklogConfig swapRedologPolicy)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void setMirrorServiceConfig(com.gigaspaces.cluster.replication.MirrorServiceConfig mirrorServiceConfig)
public com.gigaspaces.cluster.replication.MirrorServiceConfig getMirrorServiceConfig()
null
if the mirror-service disabledpublic boolean isMirrorServiceEnabled()
public boolean isReliableAsyncRepl()
public boolean shouldReplicate(ReplicationOperationType operType)
public void setPermittedOperations(List<ReplicationOperationType> permittedOperations)
public void setReliableAsyncRepl(boolean reliableAsyncRepl)
reliableAsyncRepl
- true if reliable-async-replication is enabled; false otherwise.public void setMaxRedoLogCapacity(long capacity)
public long getMaxRedoLogCapacity()
public void setMaxRedoLogMemoryCapacity(long capacity)
public long getMaxRedoLogMemoryCapacity()
public long getMaxRedoLogRecoveryCapacity()
public void setMaxRedoLogRecoveryCapacity(long capacity)
public void setLocalViewMaxRedologCapacity(Long localViewMaxRedologCapacity)
public long getLocalViewMaxRedologCapacity()
public void setLocalViewMaxDisconnectionTime(long localViewMaxDisconnectionTime)
public long getLocalViewMaxDisconnectionTime()
public void setLocalViewMaxRedologRecoveryCapacity(Long localViewMaxRedologRecoveryCapacity)
public long getLocalViewMaxRedologRecoveryCapacity()
public void setOnRedoLogCapacityExceeded(com.j_spaces.core.cluster.RedoLogCapacityExceededPolicy policy)
public com.j_spaces.core.cluster.RedoLogCapacityExceededPolicy getOnRedoLogCapacityExceeded()
public boolean isOwnerMemberHasSyncReplication()
true
if this member has sync-replication to at least one target.public void setPrimarySpaceSelector(com.gigaspaces.cluster.activeelection.PrimarySpaceSelector primarySpaceSelector)
public com.gigaspaces.cluster.activeelection.PrimarySpaceSelector getPrimarySpaceSelector()
public List<SpaceURL> getRecoverableTargets(List<String> excludeTargets)
excludeTargets
- targets that should be excluded from searchpublic List<SpaceURL> getSyncTargets(List<String> excludeTargets)
This differs from getRecoverableTargets(java.util.List)
in that:
1. all URLs are returned and there is no multicast URL - We need specific
members.
2. The target is chosen only if it sync-replicates to 'this', in contrast
to returning a target which 'this' replicates to.
excludeTargets
- public List<SpaceURL> getPrimaryTargets(List<String> excludeTargets)
excludeTargets
- public int getSpaceMemberPosition(String spaceMemberName)
public final int getRecoveryChunkSize()
public void setRecoveryChunkSize(int recoveryChunkSize)
public final boolean isReplicateOriginalState()
public void setReplicatedOriginalState(boolean isReplOriginalState)
public com.j_spaces.core.cluster.ConflictingOperationPolicy getConflictingOperationPolicy()
public void setConflictingOperationPolicy(com.j_spaces.core.cluster.ConflictingOperationPolicy conflictingOperationPolicy)
public int getRecoveryThreadPoolSize()
public void setRecoveryThreadPoolSize(int recoveryThreadPoolSize)
public long getAsyncChannelShutdownTimeout()
public void setAsyncChannelShutdownTimeout(long shutdownTimeout)
public void setOnMissingPackets(com.j_spaces.core.cluster.MissingPacketsPolicy onMissingPackets)
public com.j_spaces.core.cluster.MissingPacketsPolicy getOnMissingPackets()
public void setReplicateFullTake(boolean replicateFullTake)
public boolean isReplicateFullTake()
public com.j_spaces.core.cluster.ReplicationProcessingType getProcessingType()
public void setProcessingType(com.j_spaces.core.cluster.ReplicationProcessingType processingType)
public com.gigaspaces.internal.cluster.node.impl.config.MultiBucketReplicationPolicy getMultiBucketReplicationPolicy()
public com.j_spaces.core.cluster.SwapBacklogConfig getSwapRedologPolicy()
public com.gigaspaces.internal.cluster.node.impl.gateway.GatewaysPolicy getGatewaysPolicy()
public void setGatewaysPolicy(com.gigaspaces.internal.cluster.node.impl.gateway.GatewaysPolicy gatewaysPolicy)
public boolean hasReplicationGateways()
public boolean isFullReplication()
public boolean isReplicateLeaseExpirations()
public void setReplicateLeaseExpirations(boolean value)
public int getReplicationTargetsCount()
public void setReliableAsyncCompletionNotifierInterval(long reliableAsyncCompletionNotifierInterval)
public long getReliableAsyncCompletionNotifierInterval()
public long getReliableAsyncCompletionNotifierPacketsThreshold()
public void setReliableAsyncCompletionNotifierPacketsThreshold(long reliableAsyncCompletionNotifierPacketsThreshold)
public boolean isReplicateOnePhaseCommit()
public void setReplicateOnePhaseCommit(boolean replicateOnePhaseCommit)
public long getDurableNotificationMaxRedologCapacity()
public void setDurableNotificationMaxRedologCapacity(Long notificationMaxRedologCapacity)
public long getDurableNotificationMaxDisconnectionTime()
public void setDurableNotificationMaxDisconnectionTime(long notificationMaxDisconnectionTime)
public void setConnectionMonitorThreadPoolSize(int connectionMonitorThreadPoolSize)
public int getConnectionMonitorThreadPoolSize()
Copyright © GigaSpaces.