com.hazelcast.collection.impl.txncollection.operations
Class CollectionPrepareOperation
java.lang.Object
com.hazelcast.spi.Operation
com.hazelcast.collection.impl.collection.operations.CollectionOperation
com.hazelcast.collection.impl.collection.operations.CollectionBackupAwareOperation
com.hazelcast.collection.impl.txncollection.operations.CollectionPrepareOperation
- All Implemented Interfaces:
- DataSerializable, IdentifiedDataSerializable, BackupAwareOperation, PartitionAwareOperation
public class CollectionPrepareOperation
- extends CollectionBackupAwareOperation
Methods inherited from class com.hazelcast.spi.Operation |
getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getInvocationTime, getLogger, getNodeEngine, getPartitionId, getReplicaIndex, getResponseHandler, getService, getServiceName, getWaitTimeout, isUrgent, logError, onException, readData, setCallerUuid, setNodeEngine, setPartitionId, setReplicaIndex, setResponseHandler, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, validatesTarget, writeData |
CollectionPrepareOperation
public CollectionPrepareOperation()
CollectionPrepareOperation
public CollectionPrepareOperation(String name,
long itemId,
String transactionId,
boolean removeOperation)
shouldBackup
public boolean shouldBackup()
- Description copied from interface:
BackupAwareOperation
- Checks if a backup needs to be made.
If a call has not made any change, e.g. an AtomicLong increment with 0, no backup needs to be made.
- Returns:
- true if a backup needs to be made, false otherwise.
getBackupOperation
public Operation getBackupOperation()
- Description copied from interface:
BackupAwareOperation
- Creates the
BackupOperation
responsible for making the backup.
- Returns:
- the created
BackupOperation
responsible for making the backup.
run
public void run()
throws Exception
- Specified by:
run
in class Operation
- Throws:
Exception
getId
public int getId()
- Description copied from interface:
IdentifiedDataSerializable
- Returns type identifier for this class. Id should be unique per DataSerializableFactory.
- Returns:
- type id
writeInternal
protected void writeInternal(ObjectDataOutput out)
throws IOException
- Overrides:
writeInternal
in class CollectionOperation
- Throws:
IOException
readInternal
protected void readInternal(ObjectDataInput in)
throws IOException
- Overrides:
readInternal
in class CollectionOperation
- Throws:
IOException
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.