private class LockTableUpdater.UpdateWorker.MinimalLockImpl
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
deleted
Flag indicating that the corresponding record was already deleted in VST
|
boolean |
deleted_
Temporary holder for the 'deleted' flag -used until commit/rollback
|
private java.lang.String |
eventString
Event string representation (for logging)
|
java.util.concurrent.locks.ReentrantReadWriteLock |
guard
Lock guard
|
long |
key
Primary key
|
integer |
lockChain
Chain
|
private character |
lockFlags
Lock flags
|
int64 |
lockId
Lock Id
|
character |
lockName
Lock name
|
int64 |
lockRecid
Record Id
|
integer |
lockTable
Table fileNum
|
private character |
lockType
Lock type string
|
integer |
lockUsr
User
|
private LockType |
newType
New lock type
|
private LockType |
oldType
Old lock type
|
java.util.concurrent.atomic.AtomicLong |
persisted
Lock version last persisted
|
java.util.concurrent.atomic.AtomicLong |
version
Lock version
|
Constructor and Description |
---|
MinimalLockImpl(RecordLockEvent event)
Constructor
|
Modifier and Type | Method and Description |
---|---|
private void |
commit()
Commit the changes of the lock data state
|
private Record |
createRecord()
Create record in the _Lock VST
|
private boolean |
doPersist()
Persist lock data in the _Lock VST.
|
private Record |
findRecord()
Find record in the _Lock VST
|
void |
guardedUpdate(RecordLockEvent event)
Guarded update holder with event data
|
boolean |
persist()
Guarded persist lock data in the _Lock VST.
|
private void |
rollback()
Rollback the changes of the lock data state
|
void |
update(RecordLockEvent event)
Update holder with event data
|
public final java.util.concurrent.locks.ReentrantReadWriteLock guard
public final java.util.concurrent.atomic.AtomicLong version
public final java.util.concurrent.atomic.AtomicLong persisted
public volatile boolean deleted
public volatile boolean deleted_
public final long key
public final int64 lockId
public final integer lockUsr
public final character lockName
public final integer lockTable
public final int64 lockRecid
public final integer lockChain
private LockType oldType
private LockType newType
private character lockType
private character lockFlags
private java.lang.String eventString
public MinimalLockImpl(RecordLockEvent event)
event
- Lock eventpublic void guardedUpdate(RecordLockEvent event)
event
- lock eventpublic void update(RecordLockEvent event)
event
- lock eventprivate Record createRecord() throws PersistenceException
PersistenceException
private Record findRecord() throws PersistenceException
PersistenceException
public boolean persist() throws PersistenceException
true
if successPersistenceException
- on database error.private void commit()
private void rollback()
private boolean doPersist() throws PersistenceException
true
if successPersistenceException
- on database error.