Top Description Fields Constructors Methods
org.apache.derby.impl.store.raw.xact

public Class ContainerLocking3

extends NoLocking
Class Inheritance
Known Direct Subclasses
org.apache.derby.impl.store.raw.xact.RowLocking3Escalate
Imports
org.apache.derby.iapi.services.locks.LockFactory, .C_LockFactory, org.apache.derby.iapi.store.raw.ContainerHandle, .ContainerLock, .Transaction, org.apache.derby.shared.common.error.StandardException

A locking policy that implements container level locking with isolation degree 3.
See Also
org.apache.derby.iapi.store.raw.LockingPolicy

Field Summary

Modifier and TypeField and Description
protected final LockFactory

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public int
public boolean
lockContainer(Transaction
Transaction to associate lock with.
t
,
ContainerHandle
Container to lock.
container
,
boolean
Should lock request wait until granted?
waitForLock
,
boolean
Should container be locked for update, or read?
forUpdate
)

Overrides org.apache.derby.impl.store.raw.xact.NoLocking.lockContainer.

Implements org.apache.derby.iapi.store.raw.LockingPolicy.lockContainer.

Obtain a Container shared or exclusive lock until the end of the nested transaction.

Inherited from org.apache.derby.impl.store.raw.xact.NoLocking:
lockRecordForReadlockRecordForWriteunlockContainerunlockRecordAfterReadzeroDurationLockRecordForWrite

Field Detail

lfback to summary
protected final LockFactory lf

Constructor Detail

ContainerLocking3back to summary
protected ContainerLocking3(LockFactory lf)

Method Detail

getModeback to summary
public int getMode()

Overrides org.apache.derby.impl.store.raw.xact.NoLocking.getMode.

Implements org.apache.derby.iapi.store.raw.LockingPolicy.getMode.

Doc from org.apache.derby.iapi.store.raw.LockingPolicy.getMode.

Get the mode of this policy

lockContainerback to summary
public boolean lockContainer(Transaction t, ContainerHandle container, boolean waitForLock, boolean forUpdate) throws StandardException

Overrides org.apache.derby.impl.store.raw.xact.NoLocking.lockContainer.

Implements org.apache.derby.iapi.store.raw.LockingPolicy.lockContainer.

Obtain a Container shared or exclusive lock until the end of the nested transaction.

Parameters
t:Transaction

Doc from org.apache.derby.iapi.store.raw.LockingPolicy.lockContainer.

Transaction to associate lock with.

container:ContainerHandle

Doc from org.apache.derby.iapi.store.raw.LockingPolicy.lockContainer.

Container to lock.

waitForLock:boolean

Doc from org.apache.derby.iapi.store.raw.LockingPolicy.lockContainer.

Should lock request wait until granted?

forUpdate:boolean

Doc from org.apache.derby.iapi.store.raw.LockingPolicy.lockContainer.

Should container be locked for update, or read?

Returns:boolean

Doc from org.apache.derby.iapi.store.raw.LockingPolicy.lockContainer.

true if the lock was obtained, false if it wasn't. False should only be returned if the waitForLock policy was set to "false," and the lock was unavailable.

Exceptions
StandardException:
Standard Derby error policy