public abstract class PartitionAwareOperationFactory extends Object implements OperationFactory
Intended to be used by PartitionIteratingOperation
.
Modifier and Type | Field and Description |
---|---|
protected int[] |
partitions
Partition-operations will be created for these partition IDs.
|
Constructor and Description |
---|
PartitionAwareOperationFactory() |
Modifier and Type | Method and Description |
---|---|
PartitionAwareOperationFactory |
createFactoryOnRunner(NodeEngine nodeEngine,
int[] partitions)
This method will be called on operation runner node.
|
Operation |
createOperation()
Creates the operation.
|
abstract Operation |
createPartitionOperation(int partition)
This method can be called both caller and runner nodes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFactoryId, getId
readData, writeData
protected int[] partitions
public PartitionAwareOperationFactory createFactoryOnRunner(NodeEngine nodeEngine, int[] partitions)
If PartitionAwareOperationFactory
needs to have runner-side state different from caller-side one,
this method can be used to create it. Otherwise, stateful factories may cause JMM problems.
nodeEngine
- nodeEnginepartitions
- the partitions provided to an operation which use this
factory. The operation factory may decide to use this
externally provided partition set if it doesn't manage
one internally on its own.public abstract Operation createPartitionOperation(int partition)
Creates a partition-operation for supplied partition ID.
partition
- ID of partitionpublic Operation createOperation()
OperationFactory
createOperation
in interface OperationFactory
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.