| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.odmg.locking.LockManagerDefaultImpl
public class LockManagerDefaultImpl
The OJB default implementation of a Locking mechanism.
 This Implementation supports 4 transaction isolation levels
 as specified in the interface IsolationLevels:
     public final int IL_READ_UNCOMMITTED = 0;
     public final int IL_READ_COMMITTED = 1;
     public final int IL_REPEATABLE_READ = 2;
     public final int IL_SERIALIZABLE = 3;
 Isolationlevels can be adjusted per class.
 The proper lockhandling is done in the respective LockStrategy implementation.
 This default implementation provides persistent Locks that are stored in
 a special database table.
 To keep the locks in the database and not in memory allows to use
 them accross multiple distributed ODMG clients.
 Of course this solution causes a lot of database reads and writes even if
 no real application data is written to the database. This solution may
 thus not be suited for all environments. As the LockManager is pluggable
 its possible to replace the default implementation by user defined
 implementations.
 A different solution might be to implement the LockManager as an additional
 standalone server, that allows to elminate additional db reads and writes.
| Field Summary | |
|---|---|
private  Logger | 
log
Deprecated.  | 
| Constructor Summary | |
|---|---|
LockManagerDefaultImpl()
Deprecated.  | 
|
| Method Summary | |
|---|---|
 boolean | 
checkRead(TransactionImpl tx,
                   Identity oid,
                   Object obj)
Deprecated. checks if there is a readlock for transaction tx on object obj.  | 
 boolean | 
checkRead(TransactionImpl tx,
                   Object obj)
Deprecated. checks if there is a readlock for transaction tx on object obj.  | 
 boolean | 
checkWrite(TransactionImpl tx,
                     Identity oid,
                     Object obj)
Deprecated. checks if there is a writelock for transaction tx on object obj.  | 
 boolean | 
checkWrite(TransactionImpl tx,
                     Object obj)
Deprecated. checks if there is a writelock for transaction tx on object obj.  | 
 boolean | 
readLock(TransactionImpl tx,
                 Identity oid,
                 Object obj)
Deprecated. aquires a readlock for transaction tx on object obj.  | 
 boolean | 
readLock(TransactionImpl tx,
                 Object obj)
Deprecated. aquires a readlock for transaction tx on object obj.  | 
 boolean | 
releaseLock(TransactionImpl tx,
                       Identity oid,
                       Object obj)
Deprecated. releases a lock for transaction tx on object obj.  | 
 boolean | 
releaseLock(TransactionImpl tx,
                       Object obj)
Deprecated. releases a lock for transaction tx on object obj.  | 
 boolean | 
upgradeLock(TransactionImpl tx,
                       Identity oid,
                       Object obj)
Deprecated. upgrades readlock for transaction tx on object obj to a writelock.  | 
 boolean | 
upgradeLock(TransactionImpl tx,
                       Object obj)
Deprecated. upgrades readlock for transaction tx on object obj to a writelock.  | 
 boolean | 
writeLock(TransactionImpl tx,
                   Identity oid,
                   Object obj)
Deprecated. aquires a writelock for transaction tx on object obj.  | 
 boolean | 
writeLock(TransactionImpl tx,
                   Object obj)
Deprecated. aquires a writelock for transaction tx on object obj.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private Logger log
| Constructor Detail | 
|---|
public LockManagerDefaultImpl()
| Method Detail | 
|---|
public boolean readLock(TransactionImpl tx,
                        Object obj)
readLock in interface LockManager
public boolean readLock(TransactionImpl tx,
                        Identity oid,
                        Object obj)
LockManager
readLock in interface LockManager
public boolean writeLock(TransactionImpl tx,
                         Object obj)
writeLock in interface LockManager
public boolean writeLock(TransactionImpl tx,
                         Identity oid,
                         Object obj)
LockManager
writeLock in interface LockManager
public boolean upgradeLock(TransactionImpl tx,
                           Object obj)
upgradeLock in interface LockManager
public boolean upgradeLock(TransactionImpl tx,
                           Identity oid,
                           Object obj)
LockManager
upgradeLock in interface LockManager
public boolean releaseLock(TransactionImpl tx,
                           Object obj)
releaseLock in interface LockManager
public boolean releaseLock(TransactionImpl tx,
                           Identity oid,
                           Object obj)
LockManager
releaseLock in interface LockManager
public boolean checkRead(TransactionImpl tx,
                         Object obj)
checkRead in interface LockManager
public boolean checkRead(TransactionImpl tx,
                         Identity oid,
                         Object obj)
LockManager
checkRead in interface LockManager
public boolean checkWrite(TransactionImpl tx,
                          Object obj)
checkWrite in interface LockManager
public boolean checkWrite(TransactionImpl tx,
                          Identity oid,
                          Object obj)
LockManager
checkWrite in interface LockManager
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||