org.apache.ojb.broker.locking
Interface IsolationLevels
- All Known Subinterfaces:
- LockManager
- All Known Implementing Classes:
- ClassDescriptor, ConnectionDescriptorXmlHandler, DescriptorRepository, LockManagerCommonsImpl, LockManagerInMemoryImpl, LockManagerRemoteImpl, RepositoryXmlHandler
public interface IsolationLevels
This interface defines the lock isolation level constants used by
OJB locking api. It contains numeric constants and literal constants
representing all known isolation levels.
NOTE: The lock isolation levels are labeled like the database transaction level but
the definition of the levels is different - take care of that.
- Version:
- $Id: IsolationLevels.java 365232 2005-12-21 22:36:07Z tomdz $
Field Summary |
static int |
IL_DEFAULT
Numeric constant representing the default isolation level used by
OJB - current used default level is IL_READ_UNCOMMITTED . |
static int |
IL_NONE
Numeric constant representing an no-op isolation level. |
static int |
IL_OPTIMISTIC
Numeric constant representing the optimistic locking isolation level. |
static int |
IL_READ_COMMITTED
Numeric constant representing the commited read isolation level. |
static int |
IL_READ_UNCOMMITTED
Numeric constant representing the uncommited read isolation level. |
static int |
IL_REPEATABLE_READ
Numeric constant representing the repeatable read isolation level. |
static int |
IL_SERIALIZABLE
Numeric constant representing the serializable transactions isolation level. |
static java.lang.String |
LITERAL_IL_NONE
Literal constant representing the uncommited read isolation level. |
static java.lang.String |
LITERAL_IL_OPTIMISTIC
Literal constant representing the optimistic locking isolation level. |
static java.lang.String |
LITERAL_IL_READ_COMMITTED
Literal constant representing the commited read isolation level. |
static java.lang.String |
LITERAL_IL_READ_UNCOMMITTED
Literal constant representing the uncommited read isolation level. |
static java.lang.String |
LITERAL_IL_REPEATABLE_READ
Literal constant representing the repeatable read isolation level. |
static java.lang.String |
LITERAL_IL_SERIALIZABLE
Literal constant representing the serializable transactions isolation level. |
IL_NONE
static final int IL_NONE
- Numeric constant representing an no-op isolation level.
The lock manager completely ignores locking.
Allows:
all possible concurrent side-effects
- See Also:
- Constant Field Values
IL_READ_UNCOMMITTED
static final int IL_READ_UNCOMMITTED
- Numeric constant representing the uncommited read isolation level.
Obtaining two concurrent write locks on a given object is not
allowed. Obtaining read locks is allowed even if
another transaction is writing to that object
(Thats why this level is also called "dirty reads").
Allows:
Dirty Reads
Non-Repeatable Reads
Phantom Reads
- See Also:
- Constant Field Values
IL_READ_COMMITTED
static final int IL_READ_COMMITTED
- Numeric constant representing the commited read isolation level.
Obtaining two concurrent write locks on a given object is not allowed.
Obtaining read locks is allowed only if there is no write lock on
the given object.
Allows:
Non-Repeatable Reads
Phantom Reads
- See Also:
- Constant Field Values
IL_REPEATABLE_READ
static final int IL_REPEATABLE_READ
- Numeric constant representing the repeatable read isolation level.
As commited reads, but obtaining a write lock on an object that has
been locked for reading by another transaction is not allowed.
Allows:
Phantom Reads
- See Also:
- Constant Field Values
IL_SERIALIZABLE
static final int IL_SERIALIZABLE
- Numeric constant representing the serializable transactions isolation level.
As Repeatable Reads, but it is even not allowed to have multiple
read locks on a given object.
Allows:
-
- See Also:
- Constant Field Values
IL_OPTIMISTIC
static final int IL_OPTIMISTIC
- Numeric constant representing the optimistic locking isolation level.
The lock manager does not perform any pessimistic locking action. Normally
it's not needed to declare this isolation level in persistent object metadata,
because OJB will automatically detect an enabled optimistic locking.
NOTE: Usage of this isolation level needs an specific optimistic locking
declaration for the specified object. This declaration is not
automatically handled by OJB and need setting of configuration properties - see OJB docs.
- See Also:
- Constant Field Values
IL_DEFAULT
static final int IL_DEFAULT
- Numeric constant representing the default isolation level used by
OJB - current used default level is
IL_READ_UNCOMMITTED
.
- See Also:
- Constant Field Values
LITERAL_IL_NONE
static final java.lang.String LITERAL_IL_NONE
- Literal constant representing the uncommited read isolation level.
- See Also:
- Constant Field Values
LITERAL_IL_READ_UNCOMMITTED
static final java.lang.String LITERAL_IL_READ_UNCOMMITTED
- Literal constant representing the uncommited read isolation level.
- See Also:
- Constant Field Values
LITERAL_IL_READ_COMMITTED
static final java.lang.String LITERAL_IL_READ_COMMITTED
- Literal constant representing the commited read isolation level.
- See Also:
- Constant Field Values
LITERAL_IL_REPEATABLE_READ
static final java.lang.String LITERAL_IL_REPEATABLE_READ
- Literal constant representing the repeatable read isolation level.
- See Also:
- Constant Field Values
LITERAL_IL_SERIALIZABLE
static final java.lang.String LITERAL_IL_SERIALIZABLE
- Literal constant representing the serializable transactions isolation level.
- See Also:
- Constant Field Values
LITERAL_IL_OPTIMISTIC
static final java.lang.String LITERAL_IL_OPTIMISTIC
- Literal constant representing the optimistic locking isolation level.
- See Also:
- Constant Field Values
(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30