com.hazelcast.concurrent.lock
public final class LockStoreImpl extends Object implements DataSerializable, LockStore
Constructor and Description |
---|
LockStoreImpl() |
LockStoreImpl(LockServiceImpl lockService,
ObjectNamespace name,
int backupCount,
int asyncBackupCount) |
Modifier and Type | Method and Description |
---|---|
boolean |
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 |
getAwaitCount(Data key,
String conditionId) |
int |
getBackupCount() |
int |
getLockCount(Data key) |
Set<Data> |
getLockedKeys() |
Collection<LockResource> |
getLocks() |
ObjectNamespace |
getNamespace() |
String |
getOwnerInfo(Data key) |
long |
getRemainingLeaseTime(Data key) |
ConditionKey |
getSignalKey(Data key) |
int |
getTotalBackupCount() |
int |
getVersion(Data key) |
boolean |
isLocked(Data key) |
boolean |
isLockedBy(Data key,
String caller,
long threadId) |
boolean |
isTransactionallyLocked(Data key) |
boolean |
lock(Data key,
String caller,
long threadId) |
boolean |
lock(Data key,
String caller,
long threadId,
long leaseTime) |
AwaitOperation |
pollExpiredAwaitOp(Data key) |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
registerExpiredAwaitOp(AwaitOperation awaitResponse) |
void |
registerSignalKey(ConditionKey conditionKey) |
boolean |
removeAwait(Data key,
String conditionId,
String caller,
long threadId) |
void |
removeSignalKey(ConditionKey conditionKey) |
boolean |
startAwaiting(Data key,
String conditionId,
String caller,
long threadId) |
String |
toString() |
boolean |
txnLock(Data key,
String caller,
long threadId,
long leaseTime) |
boolean |
unlock(Data key,
String caller,
long threadId) |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public LockStoreImpl()
public LockStoreImpl(LockServiceImpl lockService, ObjectNamespace name, int backupCount, int asyncBackupCount)
public boolean extendLeaseTime(Data key, String caller, long threadId, long leaseTime)
extendLeaseTime
in interface LockStore
public boolean isLockedBy(Data key, String caller, long threadId)
isLockedBy
in interface LockStore
public int getLockCount(Data key)
getLockCount
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 isTransactionallyLocked(Data key)
isTransactionallyLocked
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 void clear()
public ObjectNamespace getNamespace()
public int getBackupCount()
public int getAsyncBackupCount()
public int getTotalBackupCount()
public boolean startAwaiting(Data key, String conditionId, String caller, long threadId)
public void registerSignalKey(ConditionKey conditionKey)
public ConditionKey getSignalKey(Data key)
public void removeSignalKey(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 © 2015 Hazelcast, Inc.. All Rights Reserved.