Class AbstractMultiSpaceReplicaDataProducer
java.lang.Object
com.gigaspaces.internal.cluster.node.impl.replica.AbstractMultiSpaceReplicaDataProducer
- All Implemented Interfaces:
ISingleStageReplicaDataProducer<IExecutableSpaceReplicaData>,ISpaceReplicaDataProducer<IExecutableSpaceReplicaData>
- Direct Known Subclasses:
SpaceBroadcastNotifyReplicaDataProducer,SpaceCopyReplicaDataProducer,SynchronizeReplicaDataProducer
public abstract class AbstractMultiSpaceReplicaDataProducer
extends Object
implements ISpaceReplicaDataProducer<IExecutableSpaceReplicaData>
Abstraction for a data producers that is a composition of multiple data producers.
- Since:
- 8.0
- Version:
- 1.0
- Author:
- anna
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.gigaspaces.internal.cluster.node.impl.replica.ISingleStageReplicaDataProducer
ISingleStageReplicaDataProducer.CloseStatus -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SpaceEngineprotected static final org.slf4j.Loggerprotected final ObjectFields inherited from interface com.gigaspaces.internal.cluster.node.impl.replica.ISingleStageReplicaDataProducer
FORCED_CLOSE_WAIT_TIME -
Constructor Summary
ConstructorsConstructorDescriptionAbstractMultiSpaceReplicaDataProducer(SpaceEngine engine, SpaceCopyReplicaParameters parameters, Object requestContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract List<ISingleStageReplicaDataProducer<? extends IExecutableSpaceReplicaData>>buildDataProducers(SpaceCopyReplicaParameters parameters) close(boolean forced) Closes the producer, frees up resources held in order to service the replica request.protected Stringprotected voidonClose()produceNextData(ISynchronizationCallback synchCallback) Produce next data needed for replica, this call will always be followed by#releaseLockedData(ISpaceReplicaData)if lockedData is true, it should keep that item represented by this data locked until the release is called This is done in order to ensure synchronization correctnessMethods 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.replica.ISingleStageReplicaDataProducer
getName, toFilterEntry
-
Field Details
-
_logger
protected static final org.slf4j.Logger _logger -
_requestContext
-
_engine
-
-
Constructor Details
-
AbstractMultiSpaceReplicaDataProducer
public AbstractMultiSpaceReplicaDataProducer(SpaceEngine engine, SpaceCopyReplicaParameters parameters, Object requestContext)
-
-
Method Details
-
buildDataProducers
protected abstract List<ISingleStageReplicaDataProducer<? extends IExecutableSpaceReplicaData>> buildDataProducers(SpaceCopyReplicaParameters parameters) -
produceNextData
Description copied from interface:ISingleStageReplicaDataProducerProduce next data needed for replica, this call will always be followed by#releaseLockedData(ISpaceReplicaData)if lockedData is true, it should keep that item represented by this data locked until the release is called This is done in order to ensure synchronization correctness- Specified by:
produceNextDatain interfaceISingleStageReplicaDataProducer<IExecutableSpaceReplicaData>- Parameters:
synchCallback- callback to the synchronization processor that needs to be called safely under lock- Returns:
- next data needed for replica, null if done. Once null is returns all executive calls must return null!
-
close
Description copied from interface:ISingleStageReplicaDataProducerCloses the producer, frees up resources held in order to service the replica request.- Specified by:
closein interfaceISingleStageReplicaDataProducer<IExecutableSpaceReplicaData>- Returns:
- true if any thread is trying to close and the lease reaper thread is trying to close at the same time.
-
onClose
protected void onClose() -
nextReplicaStage
- Specified by:
nextReplicaStagein interfaceISpaceReplicaDataProducer<IExecutableSpaceReplicaData>
-
getLogPrefix
-
dumpState
- Specified by:
dumpStatein interfaceISingleStageReplicaDataProducer<IExecutableSpaceReplicaData>
-