public abstract class AbstractReplicationSourceChannel extends Object implements IReplicationSourceChannel, IConnectionStateListener
Modifier and Type | Class and Description |
---|---|
static class |
AbstractReplicationSourceChannel.ChannelState |
Modifier and Type | Field and Description |
---|---|
protected ThreadLocalPool<ReplicatedDataPacketResource> |
_packetsPool |
protected org.slf4j.Logger |
_specificLogger |
protected org.slf4j.Logger |
_specificVerboseLogger |
protected SegmentedAtomicInteger |
_statisticsCounter |
protected final org.slf4j.Logger _specificLogger
protected final org.slf4j.Logger _specificVerboseLogger
protected final SegmentedAtomicInteger _statisticsCounter
protected final ThreadLocalPool<ReplicatedDataPacketResource> _packetsPool
public AbstractReplicationSourceChannel(DynamicSourceGroupConfigHolder groupConfig, String groupName, String memberName, IReplicationRouter replicationRouter, IReplicationMonitoredConnection connection, IReplicationGroupBacklog groupBacklog, IReplicationOutFilter outFilter, IAsyncHandlerProvider asyncHandlerProvider, IReplicationChannelDataFilter dataFilter, IReplicationSourceGroupStateListener stateListener, IReplicationGroupHistory groupHistory, ReplicationStatistics.ReplicationMode channelType, Object customBacklogMetadata, String tag)
public AbstractReplicationSourceChannel(DynamicSourceGroupConfigHolder groupConfig, String groupName, String memberName, IReplicationRouter replicationRouter, IReplicationMonitoredConnection connection, IReplicationGroupBacklog groupBacklog, IReplicationOutFilter outFilter, IAsyncHandlerProvider asyncHandlerProvider, IReplicationChannelDataFilter dataFilter, IReplicationSourceGroupStateListener stateListener, IReplicationGroupHistory groupHistory, ReplicationStatistics.ReplicationMode channelType, Object customBacklogMetadata, String tag, boolean resetTarget)
protected void start()
public String getGroupName()
public String getMemberName()
public String getMyLookupName()
public IReplicationGroupBacklog getGroupBacklog()
public IReplicationMonitoredConnection getConnection()
public boolean isDataFiltered()
public IReplicationChannelDataFilter getDataFilter()
protected void logEventInHistory(String event)
protected void wrapConnection()
public void onConnected(boolean newTarget)
onConnected
in interface IConnectionStateListener
public void onDisconnected()
onDisconnected
in interface IConnectionStateListener
protected void dispatchBacklogDropped(IBacklogMemberState memberState) throws RemoteException
RemoteException
protected abstract void onActiveImpl()
protected abstract void onDisconnectedImpl()
public boolean isActive()
public AbstractReplicationSourceChannel.ChannelState getChannelState()
public boolean pingTarget()
public boolean isClosed()
public void close()
protected abstract void closeImpl()
public void beginSynchronizing(boolean isDirectPersistencySync) throws CannotExecuteSynchronizeReplicaException
public void beginSynchronizing() throws CannotExecuteSynchronizeReplicaException
public void stopSynchronization()
public boolean isSynchronizing()
public boolean synchronizationDataGenerated(String uid)
public void synchronizationCopyStageDone()
public void signalSynchronizingDone() throws RemoteException
RemoteException
protected int replicateBatch(List<IReplicationOrderedPacket> packets) throws RemoteException, ReplicationException
RemoteException
ReplicationException
protected int replicate(IReplicationOrderedPacket packet) throws RemoteException, ReplicationException
RemoteException
ReplicationException
protected Future replicateAsync(List<IReplicationOrderedPacket> packets) throws RemoteException
RemoteException
protected Future replicateAsync(IReplicationOrderedPacket packet) throws RemoteException
RemoteException
protected abstract void onAsyncReplicateErrorResult(Throwable t, List<IReplicationOrderedPacket> finalPackets)
protected abstract void onAsyncReplicateErrorResult(Throwable t, IReplicationOrderedPacket finalPacket)
protected void replicateBatchDelayed(List<IReplicationOrderedPacket> packets) throws RemoteException, ReplicationException
equals
true
)RemoteException
ReplicationException
protected void replicateBatchDelayedAsync(List<IReplicationOrderedPacket> packets, IAsyncReplicationListener listener) throws RemoteException
RemoteException
protected List<IReplicationOrderedPacket> getPendingPackets(int batchSize)
public void sampleStatistics()
protected int getLastSampledTP()
protected int getSampleTPBefore(long timeBefore, TimeUnit unit)
public boolean isInconsistent()
protected Throwable getInconsistencyReason()
public IReplicationSourceChannelStatistics getStatistics()
public void registerWith(MetricRegistrator metricRegister)
public abstract ReplicationStatistics.ReplicationOperatingMode getChannelOpertingMode()
public abstract void flushPendingReplication()
public void replicate(IReplicationUnreliableOperation operation)
public String dumpState()
protected String onDumpState()
public ReplicationEndpointDetails getTargetReplicationEndpointDetails()
protected PlatformLogicalVersion getTargetLogicalVersion()
Copyright © GigaSpaces.