public class CachePutAllOperation extends CacheOperation implements BackupAwareOperation, MutableOperation, MutatingOperation, TargetAware
cacheService, dontCreateCacheRecordStoreIfNotExist, recordStore, wanEventPublisher
name
GENERIC_PARTITION_ID
IGNORE_COMPLETION
Constructor and Description |
---|
CachePutAllOperation() |
CachePutAllOperation(String cacheNameWithPrefix,
List<Map.Entry<Data,Data>> entries,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
int completionId) |
Modifier and Type | Method and Description |
---|---|
Operation |
getBackupOperation()
Creates the
BackupOperation responsible for making the backup. |
int |
getCompletionId() |
int |
getId()
Returns type identifier for this class.
|
protected void |
readInternal(ObjectDataInput in) |
protected boolean |
requiresExplicitServiceName()
Returns
true to force the explicit service name serialization
for this operation, false otherwise. |
void |
run()
Runs the operation.
|
void |
setCompletionId(int completionId) |
void |
setTarget(Address address)
Provides the designated target member address to which the operation
will be sent.
|
boolean |
shouldBackup()
Checks if a backup needs to be made.
|
protected void |
writeInternal(ObjectDataOutput out) |
beforeRun, beforeRunInternal, dispose, getAsyncBackupCount, getFactoryId, getServiceName, getServiceNamespace, getSyncBackupCount, logError, onInvocationException, publishWanRemove, publishWanUpdate, publishWanUpdate, publishWanUpdate
getName, toString
afterRun, call, executedLocally, getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getInvocationTime, getLogger, getNodeEngine, getOperationResponseHandler, getPartitionId, getReplicaIndex, getResponse, getService, getWaitTimeout, isUrgent, onExecutionFailure, onSetCallId, readData, returnsResponse, sendResponse, setCallerUuid, setNodeEngine, setOperationResponseHandler, setPartitionId, setReplicaIndex, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, validatesTarget, writeData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAsyncBackupCount, getSyncBackupCount
getPartitionId
readData, writeData
public int getCompletionId()
getCompletionId
in interface MutableOperation
public void setCompletionId(int completionId)
setCompletionId
in interface MutableOperation
public void run() throws Exception
Operation
Operation.run()
or Operation.call()
method should be implemented; not both.
Runs after wait-support, supposed to do actual operationrun
in class Operation
Exception
Operation.call()
public boolean shouldBackup()
BackupAwareOperation
shouldBackup
in interface BackupAwareOperation
public Operation getBackupOperation()
BackupAwareOperation
BackupOperation
responsible for making the backup.getBackupOperation
in interface BackupAwareOperation
BackupOperation
responsible for making the backup.public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void setTarget(Address address)
TargetAware
setTarget
will be invoked on each retry with the
current target member's Address
as argument
address
is provided as target address
setTarget
in interface TargetAware
address
- target member's addressprotected boolean requiresExplicitServiceName()
Operation
true
to force the explicit service name serialization
for this operation, false
otherwise.
Usually, the method should be overridden if Operation.getServiceName()
is
also overridden, but it was not overridden in the previous HZ version,
i.e. the service name was provided using an explicit external call to
Operation.setServiceName(java.lang.String)
. This mechanism is required to maintain the
backward compatibility of the serialized representation of the operation
since the service name is not serialized if it matches the one returned
by Operation.getServiceName()
.
requiresExplicitServiceName
in class Operation
protected void writeInternal(ObjectDataOutput out) throws IOException
writeInternal
in class AbstractNamedOperation
IOException
protected void readInternal(ObjectDataInput in) throws IOException
readInternal
in class AbstractNamedOperation
IOException
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.