com.hazelcast.spi
Class Operation
java.lang.Object
com.hazelcast.spi.Operation
- All Implemented Interfaces:
- DataSerializable, RemotePropagatable<Operation>
- Direct Known Subclasses:
- AbstractOperation, AbstractReplicatedMapOperation, AtomicLongBaseOperation, AtomicReferenceBaseOperation, BeginTxBackupOperation, BroadcastTxRollbackOperation, CallableTaskOperation, CancellationOperation, CheckReplicaVersion, CollectionOperation, GetMapConfigOperation, IsReplicaVersionSync, KeyBasedMapOperation, MemberCallableTaskOperation, MultiMapOperation, PurgeTxBackupOperation, QueueOperation, RecoverTxnOperation, ReplicaSyncRequest, ReplicaSyncResponse, ReplicaSyncRetryResponse, ReplicateTxOperation, RollbackTxBackupOperation, ScriptExecutorOperation, ThreadDumpOperation, UpdateManagementCenterUrlOperation, UpdateMapConfigOperation
public abstract class Operation
- extends Object
- implements DataSerializable, RemotePropagatable<Operation>
An operation could be compared the a Runnable
. So it contains logic that is going to be executed; this logic
will be placed in the run()
method.
Operation
public Operation()
isUrgent
public boolean isUrgent()
- Specified by:
isUrgent
in interface RemotePropagatable<Operation>
beforeRun
public abstract void beforeRun()
throws Exception
- Throws:
Exception
run
public abstract void run()
throws Exception
- Throws:
Exception
afterRun
public abstract void afterRun()
throws Exception
- Throws:
Exception
returnsResponse
public abstract boolean returnsResponse()
- Specified by:
returnsResponse
in interface RemotePropagatable<Operation>
getResponse
public abstract Object getResponse()
getServiceName
public String getServiceName()
setServiceName
public final Operation setServiceName(String serviceName)
getPartitionId
public final int getPartitionId()
setPartitionId
public final Operation setPartitionId(int partitionId)
getReplicaIndex
public final int getReplicaIndex()
setReplicaIndex
public final Operation setReplicaIndex(int replicaIndex)
getExecutorName
public String getExecutorName()
setExecutorName
public void setExecutorName(String executorName)
getCallId
public final long getCallId()
- Specified by:
getCallId
in interface RemotePropagatable<Operation>
validatesTarget
public boolean validatesTarget()
setValidateTarget
public final Operation setValidateTarget(boolean validateTarget)
getNodeEngine
public final NodeEngine getNodeEngine()
setNodeEngine
public final Operation setNodeEngine(NodeEngine nodeEngine)
getService
public final <T> T getService()
setService
public final Operation setService(Object service)
getCallerAddress
public final Address getCallerAddress()
- Specified by:
getCallerAddress
in interface RemotePropagatable<Operation>
getConnection
public final Connection getConnection()
- Specified by:
getConnection
in interface RemotePropagatable<Operation>
setResponseHandler
public final Operation setResponseHandler(ResponseHandler responseHandler)
- Specified by:
setResponseHandler
in interface RemotePropagatable<Operation>
getResponseHandler
public final ResponseHandler getResponseHandler()
- Specified by:
getResponseHandler
in interface RemotePropagatable<Operation>
getInvocationTime
public final long getInvocationTime()
getCallTimeout
public final long getCallTimeout()
getWaitTimeout
public final long getWaitTimeout()
setWaitTimeout
public final void setWaitTimeout(long timeout)
onException
public ExceptionAction onException(Throwable throwable)
getCallerUuid
public String getCallerUuid()
setCallerUuid
public Operation setCallerUuid(String callerUuid)
getLogger
protected final ILogger getLogger()
logError
public void logError(Throwable e)
- Specified by:
logError
in interface RemotePropagatable<Operation>
writeData
public final void writeData(ObjectDataOutput out)
throws IOException
- Description copied from interface:
DataSerializable
- Writes object fields to output stream
- Specified by:
writeData
in interface DataSerializable
- Parameters:
out
- output
- Throws:
IOException
readData
public final void readData(ObjectDataInput in)
throws IOException
- Description copied from interface:
DataSerializable
- Reads fields from the input stream
- Specified by:
readData
in interface DataSerializable
- Parameters:
in
- input
- Throws:
IOException
writeInternal
protected abstract void writeInternal(ObjectDataOutput out)
throws IOException
- Throws:
IOException
readInternal
protected abstract void readInternal(ObjectDataInput in)
throws IOException
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.