Class MultiSourceSingleFileReliableAsyncTargetProcessLog
java.lang.Object
com.gigaspaces.internal.cluster.node.impl.processlog.AbstractSingleFileTargetProcessLog
com.gigaspaces.internal.cluster.node.impl.processlog.multisourcesinglefile.MultiSourceSingleFileReliableAsyncTargetProcessLog
- All Implemented Interfaces:
IReplicationAsyncTargetProcessLog,IReplicationBatchConsumeAsyncTargetProcessLog,IReplicationTargetProcessLog,IPacketConsumedCallback,IReplicationReliableAsyncTargetProcessLog
public class MultiSourceSingleFileReliableAsyncTargetProcessLog
extends AbstractSingleFileTargetProcessLog
implements IReplicationReliableAsyncTargetProcessLog, IPacketConsumedCallback
A reliable async replication process log which merges multiple participants operations to a
single operation. Packet is marked as "pending" if not all of its data arrived. Pending packets
are not executed until all of the participants data is arrived. In the meantime the next
operations are executed only if they're not interleaving with any pending packets. In such a
case, execution will wait until the interleaving packet is consumed.
The different process logs synchronization is done using the
IReplicationParticipantsMediator component implementation.- Since:
- 8.0.4
- Author:
- idan
-
Field Summary
Fields inherited from class com.gigaspaces.internal.cluster.node.impl.processlog.AbstractSingleFileTargetProcessLog
_dataConsumer, _specificLogger -
Constructor Summary
ConstructorsConstructorDescriptionMultiSourceSingleFileReliableAsyncTargetProcessLog(MultiSourceSingleFileProcessLogConfig processLogConfig, IReplicationPacketDataBatchConsumer<?> dataConsumer, IReplicationProcessLogExceptionHandler exceptionHandler, IReplicationInFacade replicationInFacade, String myLookupName, String groupName, String sourceLookupName, boolean firstHandshakeForTarget, IReplicationGroupHistory groupHistory, IReplicationParticipantsMediator participantsMediator, long lastProcessedKey, long firstUnprocessedKey, LinkedList<MultiSourceProcessLogPacket> pendingPacketsQueue, HashMap<String, MultiSourceProcessLogPacket> packetsByUidHelperMap, IProcessMemoryManager processMemoryManager) MultiSourceSingleFileReliableAsyncTargetProcessLog(MultiSourceSingleFileProcessLogConfig processLogConfig, IReplicationPacketDataBatchConsumer<?> dataConsumer, IReplicationProcessLogExceptionHandler exceptionHandler, IReplicationInFacade replicationInFacade, String name, String groupName, String sourceLookupName, boolean firstHandshakeForTarget, IReplicationGroupHistory groupHistory, IReplicationParticipantsMediator participantsMediator, IProcessMemoryManager processMemoryManager) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected booleanprotected booleanprotected voidfilterDuplicate(List<IReplicationOrderedPacket> packets) longlongprotected booleanisClosed()protected booleanprotected booleanisOpen()protected voidlogDeletion(GlobalOrderDeletedBacklogPacket deletedBacklogPacket) voidpacketConsumed(long key) performHandshake(String memberName, IBacklogHandshakeRequest handshakeRequest) process(String sourceLookupName, IReplicationOrderedPacket packet, IReplicationInFilterCallback inFilterCallback) processBatch(String sourceLookupName, List<IReplicationOrderedPacket> packets, IReplicationInFilterCallback inFilterCallback) voidprocessHandshakeIteration(String sourceMemberName, IHandshakeIteration handshakeIteration) processIdleStateData(String sourceLookupName, IIdleStateData idleStateData, IReplicationInFilterCallback inFilterCallback) resync(IBacklogHandshakeRequest handshakeRequest) protected voidtoWireForm(IProcessResult processResult) Methods inherited from class com.gigaspaces.internal.cluster.node.impl.processlog.AbstractSingleFileTargetProcessLog
createReplicationInContext, getDataConsumer, getExceptionHandler, getGroupHistory, getGroupName, getReplicationInContext, getReplicationInFacade, getSourceLookupName, throwIfRepetitiveError, toLogMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.gigaspaces.internal.cluster.node.impl.processlog.IReplicationTargetProcessLog
getDataConsumer, toLogMessage
-
Constructor Details
-
MultiSourceSingleFileReliableAsyncTargetProcessLog
public MultiSourceSingleFileReliableAsyncTargetProcessLog(MultiSourceSingleFileProcessLogConfig processLogConfig, IReplicationPacketDataBatchConsumer<?> dataConsumer, IReplicationProcessLogExceptionHandler exceptionHandler, IReplicationInFacade replicationInFacade, String name, String groupName, String sourceLookupName, boolean firstHandshakeForTarget, IReplicationGroupHistory groupHistory, IReplicationParticipantsMediator participantsMediator, IProcessMemoryManager processMemoryManager) -
MultiSourceSingleFileReliableAsyncTargetProcessLog
public MultiSourceSingleFileReliableAsyncTargetProcessLog(MultiSourceSingleFileProcessLogConfig processLogConfig, IReplicationPacketDataBatchConsumer<?> dataConsumer, IReplicationProcessLogExceptionHandler exceptionHandler, IReplicationInFacade replicationInFacade, String myLookupName, String groupName, String sourceLookupName, boolean firstHandshakeForTarget, IReplicationGroupHistory groupHistory, IReplicationParticipantsMediator participantsMediator, long lastProcessedKey, long firstUnprocessedKey, LinkedList<MultiSourceProcessLogPacket> pendingPacketsQueue, HashMap<String, MultiSourceProcessLogPacket> packetsByUidHelperMap, IProcessMemoryManager processMemoryManager)
-
-
Method Details
-
contentRequiredWhileProcessing
protected boolean contentRequiredWhileProcessing()- Specified by:
contentRequiredWhileProcessingin classAbstractSingleFileTargetProcessLog
-
performHandshake
public GlobalOrderProcessLogHandshakeResponse performHandshake(String memberName, IBacklogHandshakeRequest handshakeRequest) throws IncomingReplicationOutOfSyncException - Specified by:
performHandshakein interfaceIReplicationTargetProcessLog- Throws:
IncomingReplicationOutOfSyncException
-
processBatch
public IProcessResult processBatch(String sourceLookupName, List<IReplicationOrderedPacket> packets, IReplicationInFilterCallback inFilterCallback) - Specified by:
processBatchin interfaceIReplicationTargetProcessLog
-
logDeletion
-
filterDuplicate
-
filterDuplicate
-
throwClosedException
protected void throwClosedException() -
process
public IProcessResult process(String sourceLookupName, IReplicationOrderedPacket packet, IReplicationInFilterCallback inFilterCallback) - Specified by:
processin interfaceIReplicationTargetProcessLog
-
close
- Specified by:
closein interfaceIReplicationTargetProcessLog- Throws:
InterruptedException
-
processHandshakeIteration
public void processHandshakeIteration(String sourceMemberName, IHandshakeIteration handshakeIteration) - Specified by:
processHandshakeIterationin interfaceIReplicationTargetProcessLog
-
resync
- Specified by:
resyncin interfaceIReplicationTargetProcessLog
-
toWireForm
- Specified by:
toWireFormin interfaceIReplicationTargetProcessLog
-
isOpen
protected boolean isOpen() -
isClosed
protected boolean isClosed() -
packetConsumed
public void packetConsumed(long key) - Specified by:
packetConsumedin interfaceIPacketConsumedCallback
-
dumpState
- Specified by:
dumpStatein interfaceIReplicationTargetProcessLog- Specified by:
dumpStatein classAbstractSingleFileTargetProcessLog
-
getProcessLogConfig
-
isFirstHandshakeForTarget
protected boolean isFirstHandshakeForTarget() -
getLastProcessedKey
public long getLastProcessedKey() -
getFirstUnprocessedKey
public long getFirstUnprocessedKey() -
getPendingPacketsQueue
-
getPacketsByUidHelperMap
-
processIdleStateData
public IProcessResult processIdleStateData(String sourceLookupName, IIdleStateData idleStateData, IReplicationInFilterCallback inFilterCallback) - Specified by:
processIdleStateDatain interfaceIReplicationTargetProcessLog
-