|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.ojb.odmg.locking.LockEntry
public class LockEntry
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 String |
oidString
the unique OID of the object to be locked. |
(package private) static long |
serialVersionUID
|
private long |
timestamp
the timestamp marking the time of acquisition of this lock |
private String |
transactionId
the GUID of the transaction that holds the lock |
Constructor Summary | |
---|---|
LockEntry()
default constructor |
|
LockEntry(String oidString,
String transactionId)
build a LockEntry from an OID and a Transaction ID |
|
LockEntry(String oidString,
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. |
String |
getOidString()
returns the OID STring of the locked object. |
long |
getTimestamp()
returns the timestamp of the acqusition of the lock. |
String |
getTransactionId()
returns the GUID string of the locking transaction. |
boolean |
isOwnedBy(TransactionImpl tx)
returns true if this lock is owned by transaction tx, else false. |
void |
setIsolationLevel(int isolationLevel)
Sets the isolationLevel. |
void |
setLockType(int locktype)
sets the locktype of this lockentry. |
void |
setOidString(String oidString)
Sets the oidString. |
void |
setTimestamp(long timestamp)
Sets the timestamp. |
void |
setTransactionId(String transactionId)
Sets the transactionId. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
public static int LOCK_READ
public static int LOCK_WRITE
private String oidString
private String transactionId
private long timestamp
private int isolationLevel
private int lockType
Constructor Detail |
---|
public LockEntry(String oidString, String transactionId, long timestamp, int isolationLevel, int lockType)
public LockEntry(String oidString, String transactionId)
public LockEntry()
Method Detail |
---|
public String getOidString()
public String getTransactionId()
public long getTimestamp()
public int getIsolationLevel()
public int getLockType()
public void setLockType(int locktype)
locktype
- LOCK_READ for read, LOCK_WRITE for write lock.public boolean isOwnedBy(TransactionImpl tx)
public void setIsolationLevel(int isolationLevel)
isolationLevel
- The isolationLevel to setpublic void setOidString(String oidString)
oidString
- The oidString to setpublic void setTimestamp(long timestamp)
timestamp
- The timestamp to setpublic void setTransactionId(String transactionId)
transactionId
- The transactionId to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |