org.apache.derby.iapi.store.raw.LockingPolicy
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the lock was granted, false if waitForLock was false and the lock could not be granted.The transaction to associate the lock with. t, ContainerHandle Open Container used to get record. Will be used
to row locks by the container they belong to. container_handle, RecordHandle The record to be locked. record, boolean Should lock request wait until granted? waitForLock, boolean Whether to open for read or write access. forUpdate)Overrides org. Implements org. Obtain lock on record being read. |
| public void | unlockRecordAfterRead(Transaction t, ContainerHandle container_handle, RecordHandle record, boolean forUpdate, boolean row_qualified)
Overrides org. Implements org. Unlock a record after it has been locked for read. |
| RowLocking2nohold | back to summary |
|---|---|
| protected RowLocking2nohold(LockFactory lf) | |
| lockRecordForRead | back to summary |
|---|---|
| public boolean lockRecordForRead(Transaction t, ContainerHandle container_handle, RecordHandle record, boolean waitForLock, boolean forUpdate) throws StandardException Overrides org. Implements org. Obtain lock on record being read. Assumes that a table level IS has been acquired. Will acquire a Shared or Update lock on the row, depending on the "forUpdate" parameter. Read lock will be acquired using zeroDuration lock.
| |
| unlockRecordAfterRead | back to summary |
|---|---|
| public void unlockRecordAfterRead(Transaction t, ContainerHandle container_handle, RecordHandle record, boolean forUpdate, boolean row_qualified) Overrides org. Implements org. Doc from org. 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.
| |