public final class RecordLockInfo extends RecordInfo implements java.io.Serializable
The information is read-only, once the object is constructed. It includes the type of lock, the time the lock was acquired, the table name and primary key of the lock, and an array of session IDs of those contexts which currently hold the lock (must be at least one).
Modifier and Type | Field and Description |
---|---|
private SessionToken[] |
lockers
Session tokens of one or more contexts which hold the lock
|
private long |
timeAcquired
Timestamp (time of epoch) at which lock was acquired
|
private RecordLockType |
type
Lock type
|
Constructor and Description |
---|
RecordLockInfo()
Default constructor
|
RecordLockInfo(RecordLockType type,
long timeAcquired,
java.lang.String databaseName,
java.lang.String tableName,
long recordID,
SessionToken[] lockers)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SessionToken[] |
getLockers()
Retrieve an array of session tokens which hold this lock.
|
java.lang.String |
getLockersPresentation()
Gets the lockers presentation.
|
long |
getTimeAcquired()
Retrieve the timestamp (time of epoch) at which the lock was acquired.
|
RecordLockType |
getType()
Retrieve the lock type.
|
void |
setLockers(SessionToken[] lockers)
Sets the session tokens of one or more contexts which hold the lock.
|
void |
setTimeAcquired(long timeAcquired)
Sets the timestamp (time of epoch) at which lock was acquired.
|
void |
setType(RecordLockType type)
Sets the lock type.
|
equals, getDatabaseName, getRecordID, getTableName, hashCode, setDatabaseName, setRecordID, setTableName
private RecordLockType type
private long timeAcquired
private SessionToken[] lockers
public RecordLockInfo()
public RecordLockInfo(RecordLockType type, long timeAcquired, java.lang.String databaseName, java.lang.String tableName, long recordID, SessionToken[] lockers)
type
- Lock type.timeAcquired
- Timestamp (time of epoch) at which lock was acquired.databaseName
- Physical database name.tableName
- Name of table.recordID
- Primary key ID of locked record.lockers
- Session tokens of one or more contexts which hold the lock.public RecordLockType getType()
public long getTimeAcquired()
public SessionToken[] getLockers()
null
and must contain at least one entry (possibly more for lock
type SHARE
.public void setType(RecordLockType type)
type
- The new lock typepublic void setTimeAcquired(long timeAcquired)
timeAcquired
- The new timestamp (time of epoch) at which lock was acquiredpublic void setLockers(SessionToken[] lockers)
lockers
- The new session tokens of one or more contexts which hold the lockpublic java.lang.String getLockersPresentation()