|
|||||||||
| Home >> All >> org >> apache >> ojb >> odmg >> [ locking overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.ojb.odmg.locking
Class LockEntry

java.lang.Objectorg.apache.ojb.odmg.locking.LockEntry
- All Implemented Interfaces:
- java.io.Serializable
- public class LockEntry
- extends java.lang.Object
- implements java.io.Serializable
- extends java.lang.Object
a persistent entry for locks. All locks that are hold from transaction on objects are represented by a LockENtry and made persistent to the database.
| Field Summary | |
private int |
isolationLevel
the isolationlevel for this lock. |
static int |
LOCK_READ
marks a Read Lock. |
static int |
LOCK_WRITE
marks a Write Lock. |
private int |
lockType
marks if this is a read or a write lock. |
private java.lang.String |
oidString
the unique OID of the object to be locked. |
private long |
timestamp
the timestamp marking the time of acquisition of this lock |
private java.lang.String |
transactionId
the GUID of the transaction that holds the lock |
| Constructor Summary | |
LockEntry()
default constructor |
|
LockEntry(java.lang.String oidString,
java.lang.String transactionId)
build a LockEntry from an OID and a Transaction ID |
|
LockEntry(java.lang.String oidString,
java.lang.String transactionId,
long timestamp,
int isolationLevel,
int lockType)
Multiargument constructor for fast loading of LockEntries by OJB. |
|
| Method Summary | |
int |
getIsolationLevel()
returns the isolation level of this lock |
int |
getLockType()
returns the locktype of this lock. |
java.lang.String |
getOidString()
returns the OID STring of the locked object. |
long |
getTimestamp()
returns the timestamp of the acqusition of the lock. |
java.lang.String |
getTransactionId()
returns the GUID string of the locking transaction. |
boolean |
isOwnedBy(org.apache.ojb.odmg.TransactionImpl tx)
returns true if this lock is owned by transaction tx, else false. |
void |
setLockType(int locktype)
sets the locktype of this lockentry. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
LOCK_READ
public static int LOCK_READ
- marks a Read Lock.
LOCK_WRITE
public static int LOCK_WRITE
- marks a Write Lock.
oidString
private java.lang.String oidString
- the unique OID of the object to be locked.
transactionId
private java.lang.String transactionId
- the GUID of the transaction that holds the lock
timestamp
private long timestamp
- the timestamp marking the time of acquisition of this lock
isolationLevel
private int isolationLevel
- the isolationlevel for this lock.
lockType
private int lockType
- marks if this is a read or a write lock.
LOCK_READ = 0;
LOCK_WRITE = 1;
| Constructor Detail |
LockEntry
public LockEntry(java.lang.String oidString, java.lang.String transactionId, long timestamp, int isolationLevel, int lockType)
- Multiargument constructor for fast loading of LockEntries by OJB.
LockEntry
public LockEntry(java.lang.String oidString, java.lang.String transactionId)
- build a LockEntry from an OID and a Transaction ID
LockEntry
public LockEntry()
- default constructor
| Method Detail |
getOidString
public java.lang.String getOidString()
- returns the OID STring of the locked object.
getTransactionId
public java.lang.String getTransactionId()
- returns the GUID string of the locking transaction.
getTimestamp
public long getTimestamp()
- returns the timestamp of the acqusition of the lock.
getIsolationLevel
public int getIsolationLevel()
- returns the isolation level of this lock
getLockType
public int getLockType()
- returns the locktype of this lock.
setLockType
public void setLockType(int locktype)
- sets the locktype of this lockentry.
isOwnedBy
public boolean isOwnedBy(org.apache.ojb.odmg.TransactionImpl tx)
- returns true if this lock is owned by transaction tx, else false.
|
|||||||||
| Home >> All >> org >> apache >> ojb >> odmg >> [ locking overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.ojb.odmg.locking.LockEntry