public class RaftLock extends BlockingResource<LockInvocationKey> implements IdentifiedDataSerializable
Modifier and Type | Method and Description |
---|---|
protected Collection<Long> |
getActivelyAttachedSessions()
Returns session id of the current lock holder or an empty collection if
the lock is not held
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
protected void |
onSessionClose(long sessionId,
Map<Long,Object> responses)
Releases the lock if the current lock holder's session is closed.
|
protected void |
onWaitKeyExpire(LockInvocationKey key) |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
addWaitKey, clearWaitKeys, cloneForSnapshot, getAllWaitKeys, getGroupId, getInternalWaitKeysMap, getName, getWaitKeyContainer, internalToString, removeWaitKey, waitKeyContainersIterator
protected void onSessionClose(long sessionId, Map<Long,Object> responses)
onSessionClose
in class BlockingResource<LockInvocationKey>
protected Collection<Long> getActivelyAttachedSessions()
getActivelyAttachedSessions
in class BlockingResource<LockInvocationKey>
protected void onWaitKeyExpire(LockInvocationKey key)
onWaitKeyExpire
in class BlockingResource<LockInvocationKey>
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
writeData
in class BlockingResource<LockInvocationKey>
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
readData
in class BlockingResource<LockInvocationKey>
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.