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 LockStore
public com.hazelcast.concurrent.lock.LockResourceImpl getLock(Data key)
public boolean isLockedBy(Data key, String caller, long threadId)
isLockedBy
in interface LockStore
public int getLockCount(Data key)
getLockCount
in interface LockStore
public int getLockedEntryCount()
getLockedEntryCount
in interface LockStore
public long getRemainingLeaseTime(Data key)
getRemainingLeaseTime
in interface LockStore
public boolean canAcquireLock(Data key, String caller, long threadId)
canAcquireLock
in interface LockStore
public boolean shouldBlockReads(Data key)
shouldBlockReads
in interface LockStore
public boolean forceUnlock(Data key)
forceUnlock
in interface LockStore
public int getVersion(Data key)
public Collection<LockResource> getLocks()
public Set<Data> getLockedKeys()
getLockedKeys
in interface LockStore
public 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 LockStore
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.