org.apache.derby.impl.store.raw.xact
Class RowLockingRR
- java.lang.Object
-
- org.apache.derby.impl.store.raw.xact.RowLocking3
-
- org.apache.derby.impl.store.raw.xact.RowLockingRR
-
- All Implemented Interfaces:
- LockingPolicy
- Direct Known Subclasses:
- RowLocking2
public class RowLockingRR extends RowLocking3
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.- See Also:
LockingPolicy
-
-
Field Summary
-
Fields inherited from interface org.apache.derby.iapi.store.raw.LockingPolicy
MODE_CONTAINER, MODE_NONE, MODE_RECORD
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidunlockContainer(Transaction t, ContainerHandle container)Called when a container is closed.voidunlockRecordAfterRead(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, lockRecordForWrite, zeroDurationLockRecordForWrite
-
-
-
-
Method Detail
-
unlockRecordAfterRead
public void unlockRecordAfterRead(Transaction t, ContainerHandle container_handle, RecordHandle record, boolean forUpdate, boolean row_qualified) throws StandardException
Unlock a record after it has been locked for read.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.
- Specified by:
unlockRecordAfterReadin interfaceLockingPolicy- Throws:
StandardException- Standard exception policy.- See Also:
Page
-
unlockContainer
public void unlockContainer(Transaction t, ContainerHandle container)
Description copied from interface:LockingPolicyCalled when a container is closed.- Specified by:
unlockContainerin interfaceLockingPolicy- See Also:
ContainerHandle,ContainerHandle.close()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG