com.hazelcast.spi
Class Operation
java.lang.Object
com.hazelcast.spi.Operation
- All Implemented Interfaces:
- DataSerializable
- Direct Known Subclasses:
- AbstractOperation
public abstract class Operation
- extends Object
- implements DataSerializable
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Operation
public Operation()
isUrgent
public boolean isUrgent()
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()
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()
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 com.hazelcast.nio.Address getCallerAddress()
getConnection
public final com.hazelcast.nio.Connection getConnection()
setResponseHandler
public final Operation setResponseHandler(ResponseHandler responseHandler)
getResponseHandler
public final ResponseHandler getResponseHandler()
getStartTime
public final long getStartTime()
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 com.hazelcast.logging.ILogger getLogger()
logError
public void logError(Throwable e)
writeData
public final void writeData(com.hazelcast.nio.ObjectDataOutput out)
throws IOException
- Specified by:
writeData
in interface DataSerializable
- Throws:
IOException
readData
public final void readData(com.hazelcast.nio.ObjectDataInput in)
throws IOException
- Specified by:
readData
in interface DataSerializable
- Throws:
IOException
writeInternal
protected abstract void writeInternal(com.hazelcast.nio.ObjectDataOutput out)
throws IOException
- Throws:
IOException
readInternal
protected abstract void readInternal(com.hazelcast.nio.ObjectDataInput in)
throws IOException
- Throws:
IOException
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.