public class LockOperation extends AbstractOperation implements WaitSupport, BackupAwareOperation
| Modifier and Type | Field and Description |
|---|---|
static int |
ANY_THREAD |
static long |
DEFAULT_LOCK_TTL |
protected Data |
key |
protected ObjectNamespace |
namespace |
protected Object |
response |
protected long |
threadId |
protected long |
ttl |
| Constructor and Description |
|---|
LockOperation() |
LockOperation(ObjectNamespace namespace,
Data key,
long threadId,
long timeout) |
LockOperation(ObjectNamespace namespace,
Data key,
long threadId,
long ttl,
long timeout) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAsyncBackupCount() |
Operation |
getBackupOperation()
Creates the
BackupOperation responsible for making the backup. |
int |
getFactoryId()
Returns DataSerializableFactory factory id for this class.
|
int |
getId()
Returns type identifier for this class.
|
Data |
getKey() |
protected LockStoreImpl |
getLockStore() |
Object |
getResponse() |
String |
getServiceName() |
int |
getSyncBackupCount() |
WaitNotifyKey |
getWaitKey() |
void |
onWaitExpire() |
protected void |
readInternal(ObjectDataInput in) |
void |
run() |
void |
setAsyncBackup(boolean asyncBackup) |
boolean |
shouldBackup()
Checks if a backup needs to be made.
|
boolean |
shouldWait() |
protected void |
writeInternal(ObjectDataOutput out) |
afterRun, beforeRun, returnsResponsegetCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getExecutorName, getInvocationTime, getLogger, getNodeEngine, getPartitionId, getReplicaIndex, getResponseHandler, getService, getWaitTimeout, isUrgent, logError, onException, readData, setCallerUuid, setExecutorName, setNodeEngine, setPartitionId, setReplicaIndex, setResponseHandler, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, validatesTarget, writeDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetWaitTimeoutgetAsyncBackupCount, getSyncBackupCountgetPartitionIdreadData, writeDatapublic static final long DEFAULT_LOCK_TTL
public static final int ANY_THREAD
protected ObjectNamespace namespace
protected Data key
protected long threadId
protected long ttl
protected transient Object response
public LockOperation()
public LockOperation(ObjectNamespace namespace, Data key, long threadId, long timeout)
public LockOperation(ObjectNamespace namespace, Data key, long threadId, long ttl, long timeout)
public Operation getBackupOperation()
BackupAwareOperationBackupOperation responsible for making the backup.getBackupOperation in interface BackupAwareOperationpublic boolean shouldBackup()
BackupAwareOperationshouldBackup in interface BackupAwareOperationpublic final WaitNotifyKey getWaitKey()
getWaitKey in interface WaitSupportpublic final boolean shouldWait()
shouldWait in interface WaitSupportpublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializablepublic final void onWaitExpire()
onWaitExpire in interface WaitSupportpublic final Object getResponse()
getResponse in class AbstractOperationprotected final LockStoreImpl getLockStore()
public final int getSyncBackupCount()
public final int getAsyncBackupCount()
public final void setAsyncBackup(boolean asyncBackup)
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 AbstractOperationIOExceptionCopyright © 2015 Hazelcast, Inc.. All Rights Reserved.