public abstract class AbstractLockOperation 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 |
BITMASK_LOAD_ALL_WITH_USER_SUPPLIED_KEYS, GENERIC_PARTITION_ID| Modifier | Constructor and Description |
|---|---|
|
AbstractLockOperation() |
protected |
AbstractLockOperation(ObjectNamespace namespace,
Data key,
long threadId) |
protected |
AbstractLockOperation(ObjectNamespace namespace,
Data key,
long threadId,
long timeout) |
|
AbstractLockOperation(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, getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getInvocationTime, getLogger, getNodeEngine, getOperationResponseHandler, getPartitionId, getReplicaIndex, getService, getWaitTimeout, isFlagSet, isUrgent, logError, onExecutionFailure, onInvocationException, readData, returnsResponse, run, sendResponse, setCallerUuid, setFlag, setNodeEngine, setOperationResponseHandler, setPartitionId, setReplicaIndex, 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 AbstractLockOperation()
protected AbstractLockOperation(ObjectNamespace namespace, Data key, long threadId)
protected AbstractLockOperation(ObjectNamespace namespace, Data key, long threadId, long timeout)
public AbstractLockOperation(ObjectNamespace namespace, Data key, long threadId, long leaseTime, long timeout)
public final Object getResponse()
getResponse in class Operationprotected 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 long getReferenceCallId()
protected final void setReferenceCallId(long refCallId)
public final String getServiceName()
getServiceName in class Operationpublic final Data getKey()
public final int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializableprotected void writeInternal(ObjectDataOutput out) throws IOException
writeInternal in class OperationIOExceptionprotected void readInternal(ObjectDataInput in) throws IOException
readInternal in class OperationIOExceptionprotected 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 © 2017 Hazelcast, Inc.. All Rights Reserved.