public abstract class BaseLockOperation extends AbstractOperation implements PartitionAwareOperation, IdentifiedDataSerializable
| Modifier and Type | Field and Description |
|---|---|
static int |
ANY_THREAD |
protected Data |
key |
protected long |
leaseTime |
protected ObjectNamespace |
namespace |
protected Object |
response |
protected long |
threadId |
CALL_ID_LOCAL_SKIPPED, GENERIC_PARTITION_ID| Modifier | Constructor and Description |
|---|---|
|
BaseLockOperation() |
protected |
BaseLockOperation(ObjectNamespace namespace,
Data key,
long threadId) |
protected |
BaseLockOperation(ObjectNamespace namespace,
Data key,
long threadId,
long timeout) |
|
BaseLockOperation(ObjectNamespace namespace,
Data key,
long threadId,
long leaseTime,
long timeout) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAsyncBackupCount() |
int |
getFactoryId()
Returns DataSerializableFactory factory id for this class.
|
Data |
getKey() |
protected LockStoreImpl |
getLockStore() |
protected long |
getReferenceCallId() |
Object |
getResponse() |
String |
getServiceName() |
int |
getSyncBackupCount() |
protected void |
onSetCallId()
This method is called every time a new callId is set to the operation.
|
protected void |
readInternal(ObjectDataInput in) |
void |
setAsyncBackup(boolean asyncBackup) |
protected void |
setReferenceCallId(long refCallId) |
protected void |
toString(StringBuilder sb)
A template method allows for additional information to be passed into the
Operation.toString() method. |
protected void |
writeInternal(ObjectDataOutput out) |
afterRun, beforeRun, returnsResponsegetCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getInvocationTime, getLogger, getNodeEngine, getOperationResponseHandler, getPartitionId, getReplicaIndex, getResponseHandler, getService, getWaitTimeout, isUrgent, logError, onException, onExecutionFailure, onInvocationException, readData, run, sendResponse, setCallerUuid, setNodeEngine, setOperationResponseHandler, setPartitionId, setReplicaIndex, setResponseHandler, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, validatesTarget, writeDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPartitionIdgetIdreadData, writeDatapublic static final int ANY_THREAD
protected ObjectNamespace namespace
protected Data key
protected long threadId
protected long leaseTime
protected transient Object response
public BaseLockOperation()
protected BaseLockOperation(ObjectNamespace namespace, Data key, long threadId)
protected BaseLockOperation(ObjectNamespace namespace, Data key, long threadId, long timeout)
public BaseLockOperation(ObjectNamespace namespace, Data key, long threadId, long leaseTime, long timeout)
public final Object getResponse()
getResponse in class AbstractOperationprotected final LockStoreImpl getLockStore()
public final int getSyncBackupCount()
public final int getAsyncBackupCount()
public final void setAsyncBackup(boolean asyncBackup)
protected void onSetCallId()
OperationOperation.getCallId().
For example an operation can distinguish the first invocation and invocation retries by keeping
the initial callId.onSetCallId in class Operationprotected final void setReferenceCallId(long refCallId)
protected final long getReferenceCallId()
public final String getServiceName()
getServiceName in class Operationpublic final Data getKey()
public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializableprotected void writeInternal(ObjectDataOutput out) throws IOException
writeInternal in class AbstractOperationIOExceptionprotected void readInternal(ObjectDataInput in) throws IOException
readInternal in class AbstractOperationIOExceptionprotected void toString(StringBuilder sb)
OperationOperation.toString() method. So an Operation
subclass can override this method and add additional debugging content. The default implementation does nothing so
one is not forced to provide an empty implementation.
It is a good practice always to call the super.toString(stringBuffer) when implementing this method to make sure
that the super class can inject content if needed.Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.