public final class LockStoreImpl extends Object implements DataSerializable, LockStore
| Constructor and Description |
|---|
LockStoreImpl() |
LockStoreImpl(LockService lockService,
ObjectNamespace name,
EntryTaskScheduler entryTaskScheduler,
int backupCount,
int asyncBackupCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAwait(Data key,
String conditionId,
String caller,
long threadId) |
boolean |
canAcquireLock(Data key,
String caller,
long threadId) |
void |
clear() |
boolean |
extendLeaseTime(Data key,
String caller,
long threadId,
long leaseTime) |
boolean |
forceUnlock(Data key) |
int |
getAsyncBackupCount() |
int |
getBackupCount() |
com.hazelcast.concurrent.lock.LockResourceImpl |
getLock(Data key) |
int |
getLockCount(Data key) |
int |
getLockedEntryCount() |
Set<Data> |
getLockedKeys() |
Collection<LockResource> |
getLocks() |
ObjectNamespace |
getNamespace() |
WaitNotifyKey |
getNotifiedKey(Data key) |
String |
getOwnerInfo(Data key) |
long |
getRemainingLeaseTime(Data key) |
int |
getTotalBackupCount() |
int |
getVersion(Data key) |
boolean |
hasLock() |
boolean |
hasSignalKey(ConditionKey conditionKey) |
boolean |
isLocked(Data key) |
boolean |
isLockedBy(Data key,
String caller,
long threadId) |
boolean |
lock(Data key,
String caller,
long threadId,
long referenceId,
long leaseTime) |
AwaitOperation |
pollExpiredAwaitOp(Data key) |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
registerExpiredAwaitOp(AwaitOperation awaitResponse) |
void |
removeAwait(Data key,
String conditionId,
String caller,
long threadId) |
void |
removeSignalKey(ConditionKey conditionKey) |
boolean |
shouldBlockReads(Data key) |
void |
signal(Data key,
String conditionId,
int maxSignalCount,
String objectName) |
String |
toString() |
boolean |
txnLock(Data key,
String caller,
long threadId,
long referenceId,
long leaseTime,
boolean blockReads) |
boolean |
unlock(Data key,
String caller,
long threadId,
long referenceId) |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public LockStoreImpl()
public LockStoreImpl(LockService lockService, ObjectNamespace name, EntryTaskScheduler entryTaskScheduler, int backupCount, int asyncBackupCount)
public boolean txnLock(Data key, String caller, long threadId, long referenceId, long leaseTime, boolean blockReads)
public boolean extendLeaseTime(Data key, String caller, long threadId, long leaseTime)
extendLeaseTime in interface LockStorepublic com.hazelcast.concurrent.lock.LockResourceImpl getLock(Data key)
public boolean isLockedBy(Data key, String caller, long threadId)
isLockedBy in interface LockStorepublic int getLockCount(Data key)
getLockCount in interface LockStorepublic int getLockedEntryCount()
getLockedEntryCount in interface LockStorepublic long getRemainingLeaseTime(Data key)
getRemainingLeaseTime in interface LockStorepublic boolean canAcquireLock(Data key, String caller, long threadId)
canAcquireLock in interface LockStorepublic boolean shouldBlockReads(Data key)
shouldBlockReads in interface LockStorepublic boolean forceUnlock(Data key)
forceUnlock in interface LockStorepublic int getVersion(Data key)
public Collection<LockResource> getLocks()
public Set<Data> getLockedKeys()
getLockedKeys in interface LockStorepublic boolean hasLock()
public void clear()
public ObjectNamespace getNamespace()
public int getBackupCount()
public int getAsyncBackupCount()
public int getTotalBackupCount()
public WaitNotifyKey getNotifiedKey(Data key)
public void removeSignalKey(ConditionKey conditionKey)
public boolean hasSignalKey(ConditionKey conditionKey)
public void registerExpiredAwaitOp(AwaitOperation awaitResponse)
public AwaitOperation pollExpiredAwaitOp(Data key)
public String getOwnerInfo(Data key)
getOwnerInfo in interface LockStorepublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOExceptionpublic void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOExceptionCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.