|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.store.raw.xact.NoLocking
org.apache.derby.impl.store.raw.xact.RowLocking3
org.apache.derby.impl.store.raw.xact.RowLockingRR
A locking policy that implements row level locking with repeatable read isolation. Since phantom protection with previous key locking is actually handled by the upper level access methods, the only difference in repeatable read is that read locks are of type RowLock.RS2. This type will not conflict with a previous key insert lock.
LockingPolicy
Field Summary |
Fields inherited from class org.apache.derby.impl.store.raw.xact.RowLocking3 |
lf |
Fields inherited from interface org.apache.derby.iapi.store.raw.LockingPolicy |
MODE_CONTAINER, MODE_NONE, MODE_RECORD |
Constructor Summary | |
protected |
RowLockingRR(LockFactory lf)
|
Method Summary | |
protected RowLock |
getReadLockType()
Get type of lock to get while reading data. |
protected RowLock |
getUpdateLockType()
Get type of lock to get while requesting "update" lock. |
protected RowLock |
getWriteLockType()
Get type of lock to get while writing data. |
void |
unlockRecordAfterRead(Transaction t,
ContainerHandle container_handle,
RecordHandle record,
boolean forUpdate,
boolean row_qualified)
Unlock a record after it has been locked for read. |
Methods inherited from class org.apache.derby.impl.store.raw.xact.RowLocking3 |
getMode, lockContainer, lockRecordForRead, lockRecordForRead, lockRecordForWrite, lockRecordForWrite, unlockContainer, zeroDurationLockRecordForWrite |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected RowLockingRR(LockFactory lf)
Method Detail |
protected RowLock getReadLockType()
RowLocking3
This routine is provided so that class's like RowLockingRR can override just this routine to get RS2 locks vs RS3 locks, and still reuse all the other code in this class.
getReadLockType
in class RowLocking3
protected RowLock getUpdateLockType()
RowLocking3
This routine is provided so that class's like RowLockingRR can override just this routine to get RU2 locks vs RU3 locks, and still reuse all the other code in this class.
getUpdateLockType
in class RowLocking3
protected RowLock getWriteLockType()
RowLocking3
This routine is provided so that class's like RowLockingRR can override just this routine to get RX2 locks vs RX3 locks, and still reuse all the other code in this class.
getWriteLockType
in class RowLocking3
public void unlockRecordAfterRead(Transaction t, ContainerHandle container_handle, RecordHandle record, boolean forUpdate, boolean row_qualified) throws StandardException
In repeatable read only unlock records which "did not qualify". For example in a query like "select * from foo where a = 1" on a table with no index it is only necessary to hold locks on rows where a=1, but in the process of finding those rows the system will get locks on other rows to verify they are committed before applying the qualifier. Those locks can be released under repeatable read isolation.
unlockRecordAfterRead
in interface LockingPolicy
unlockRecordAfterRead
in class NoLocking
StandardException
- Standard exception policy.
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |