Interface IReplicationSourceGroup
- All Known Implementing Classes:
AbstractReplicationSourceGroup,AsyncReplicationSourceGroup,ReliableAsyncReplicationSourceGroup,SyncReplicationSourceGroup
public interface IReplicationSourceGroup
A replication source group consists of one or more target members that shares the same data that
needs to be replicated, each member is being replicated to using a dedicated
IReplicationSourceChannel. Each target member is receiving and processing the replication by a
corresponding IReplicationTargetGroup.- Since:
- 8.0
- Author:
- eitany
-
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeExecute(ReplicationOutContext replicationContext, IEntryHolder entryHolder, ReplicationSingleOperationType operationType) Creates a single entry holder operation replication data from the given properties and add it to the provided contextvoidbeforeExecuteGeneric(ReplicationOutContext replicationContext, Object operationData, ReplicationSingleOperationType operationType) Create a single type descriptor operation replication data and add it to provided contextvoidbeforeTransactionExecute(ReplicationOutContext replicationContext, ServerTransaction transaction, ArrayList<IEntryHolder> lockedEntries, ReplicationMultipleOperationType operationType) Creates transaction replication data and adds it to the provided contextvoidbeginSynchronizing(String synchronizingMemberLookupName, Object synchronizingSourceUniqueId) Signal this source group that one of its channel is now used for space synchronization replicavoidbeginSynchronizing(String synchronizingMemberLookupName, Object synchronizingSourceUniqueId, boolean isDirectPersistencySync) booleancheckChannelConnected(String sourceMemberLookupName) voidclose()Close this replication group, once closed it can no longer be usedvoidcloseTemporaryChannel(String sourceMemberName) Closes a temporary created channelvoidcreateTemporaryChannel(String memberName, Object customBacklogMetadata) Creates a temporary channel to an existing member of this group, if a channel is already created then this method does nothing This method should be called when there is a need to create a temporary channel from this group to the target group to perform some operation and should not be used for a persistent channelintexecute(IReplicationGroupOutContext groupContext) Executes the replication specified by the provided group contextvoidexecute(IReplicationUnreliableOperation operation) booleanflushPendingReplication(long timeout, TimeUnit units) getChannelEndpointDetails(String sourceMemberLookupName) voidMonitors sla state of the replication groupvoidregisterWith(MetricRegistrator metricRegister) voidvoidsetActive(MetricRegistrator metricRegistrator) voidsetPassive(boolean closeProxy) voidstopSynchronization(String synchronizingMemberLookupName) Signal this source group that one of its channel synchronization state is abortedbeginSynchronizing(String, Object)voidsynchronizationCopyStageDone(String synchronizingMemberLookupName) During synchronization process, notify the channel specified by the target name that the copy iteration process is done in order for the filtering mechanism to know that any following packets occurred completely after the synchronization copy stage.booleansynchronizationDataGenerated(String synchronizingMemberLookupName, String uid) During synchronization process, notify the channel specified by the target name, that a sync data was generated in order for it to know to filter older data when replicating to target
-
Method Details
-
beforeExecute
void beforeExecute(ReplicationOutContext replicationContext, IEntryHolder entryHolder, ReplicationSingleOperationType operationType) Creates a single entry holder operation replication data from the given properties and add it to the provided context- Parameters:
replicationContext- context to attach the replication data toentryHolder- the entry holder dataoperationType- the operation type
-
beforeExecuteGeneric
void beforeExecuteGeneric(ReplicationOutContext replicationContext, Object operationData, ReplicationSingleOperationType operationType) Create a single type descriptor operation replication data and add it to provided context -
beforeTransactionExecute
void beforeTransactionExecute(ReplicationOutContext replicationContext, ServerTransaction transaction, ArrayList<IEntryHolder> lockedEntries, ReplicationMultipleOperationType operationType) Creates transaction replication data and adds it to the provided context -
execute
Executes the replication specified by the provided group context- Returns:
- true iff the replication ended.
-
execute
-
close
void close()Close this replication group, once closed it can no longer be used -
checkChannelConnected
- Returns:
- true is an underlying channel to the specified member is connected
-
getChannelEndpointDetails
-
beginSynchronizing
Signal this source group that one of its channel is now used for space synchronization replica- Parameters:
synchronizingMemberLookupName- the channel target name that is used for synchronization
-
beginSynchronizing
-
synchronizationDataGenerated
During synchronization process, notify the channel specified by the target name, that a sync data was generated in order for it to know to filter older data when replicating to target -
synchronizationCopyStageDone
During synchronization process, notify the channel specified by the target name that the copy iteration process is done in order for the filtering mechanism to know that any following packets occurred completely after the synchronization copy stage. -
stopSynchronization
Signal this source group that one of its channel synchronization state is abortedbeginSynchronizing(String, Object) -
getGroupName
String getGroupName()- Returns:
- group name
-
getGroupBacklog
IReplicationGroupBacklog getGroupBacklog()- Returns:
- underlying group backlog
-
getChannelsStatus
-
monitorConsistencyLevel
Monitors sla state of the replication group- Throws:
ConsistencyLevelViolationException- if the sla is breached- Since:
- 9.5
-
getStatistics
IReplicationSourceGroupStatistics getStatistics() -
setActive
-
setPassive
void setPassive(boolean closeProxy) - Parameters:
closeProxy- - whether to close the stub proxy when it has no more references.
-
flushPendingReplication
-
sampleStatistics
void sampleStatistics() -
dumpState
String dumpState() -
getConfigHolder
DynamicSourceGroupConfigHolder getConfigHolder() -
createTemporaryChannel
Creates a temporary channel to an existing member of this group, if a channel is already created then this method does nothing This method should be called when there is a need to create a temporary channel from this group to the target group to perform some operation and should not be used for a persistent channel- Parameters:
memberName- group member to create the channel to- Since:
- 9.0
-
closeTemporaryChannel
Closes a temporary created channel- Since:
- 9.0
- See Also:
-
registerWith
-