Class SpaceCopyReplicaRunnable
java.lang.Object
com.gigaspaces.internal.utils.concurrent.AsyncCallable
com.gigaspaces.internal.cluster.node.impl.replica.SpaceCopyReplicaRunnable
- All Implemented Interfaces:
AsyncFutureListener<Collection<ISpaceReplicaData>>,Callable<IAsyncHandlerProvider.CycleResult>
public class SpaceCopyReplicaRunnable
extends AsyncCallable
implements AsyncFutureListener<Collection<ISpaceReplicaData>>
Retrieve space copy replica data, can have multiple instances of this class running concurrently
to retrieve the replica data
- Since:
- 8.0
- Author:
- eitany
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSpaceCopyReplicaRunnable(ReplicationNode replicationNode, IReplicationMonitoredConnection originConnection, ISpaceReplicaDataConsumer replicaDataProcessor, ISpaceCopyReplicaInFilter inFilter, Object replicaRemoteContext, int fetchBatchSize, SpaceReplicaState state, CyclicAtomicInteger orderProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()call()longprotected booleanhasProgress(long lastIterationTimeStamp) returns true if progress has been identified since last iteration timestamp.voidonResult(AsyncResult<Collection<ISpaceReplicaData>> result) A callback when a result of an async invocation arrives.protected voidprocessBatch(Collection<ISpaceReplicaData> copiedData, boolean resumeNow) Methods inherited from class com.gigaspaces.internal.utils.concurrent.AsyncCallable
getHandler, setHandler
-
Field Details
-
_logger
protected static final org.slf4j.Logger _logger
-
-
Constructor Details
-
SpaceCopyReplicaRunnable
public SpaceCopyReplicaRunnable(ReplicationNode replicationNode, IReplicationMonitoredConnection originConnection, ISpaceReplicaDataConsumer replicaDataProcessor, ISpaceCopyReplicaInFilter inFilter, Object replicaRemoteContext, int fetchBatchSize, SpaceReplicaState state, CyclicAtomicInteger orderProvider)
-
-
Method Details
-
getIntermediateResult
-
call
- Specified by:
callin interfaceCallable<IAsyncHandlerProvider.CycleResult>
-
getLastIterationTimeStamp
public long getLastIterationTimeStamp() -
abort
public void abort() -
onResult
Description copied from interface:AsyncFutureListenerA callback when a result of an async invocation arrives.- Specified by:
onResultin interfaceAsyncFutureListener<Collection<ISpaceReplicaData>>
-
hasProgress
protected boolean hasProgress(long lastIterationTimeStamp) returns true if progress has been identified since last iteration timestamp.- Parameters:
lastIterationTimeStamp- last timestamp to compare with- Returns:
- true if currently in progress or if last timestamp is GT param.
-
processBatch
-