|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.util.lock.Locker<K>
com.sun.sgs.impl.util.lock.BasicLocker<K>
com.sun.sgs.impl.util.lock.TxnLocker<com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key>
com.sun.sgs.impl.kernel.LockingAccessCoordinator.LockerImpl
public static class LockingAccessCoordinator.LockerImpl
Define a locker that records information about the transaction requesting locks, and descriptions.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.sun.sgs.profile.AccessedObjectsDetail |
|---|
AccessedObjectsDetail.ConflictType |
| Field Summary |
|---|
| Fields inherited from class com.sun.sgs.impl.util.lock.TxnLocker |
|---|
requestedStartTime, txn |
| Constructor Summary | |
|---|---|
LockingAccessCoordinator.LockerImpl(TxnLockManager<com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key> lockManager,
Transaction txn,
long requestedStartTime)
Creates an instance of this class. |
|
| Method Summary | |
|---|---|
List<AccessedObject> |
getAccessedObjects()
The collection of requested object accesses. |
byte[] |
getConflictingId()
Returns the identifier of the transaction that caused this access to fail, if any and if known. |
AccessedObjectsDetail.ConflictType |
getConflictType()
The type of conflict, if any, caused by these object accesses. |
(package private) Object |
getDescription(com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key key)
Gets the description associated with a key for this locker. |
protected LockRequest<com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key> |
newLockRequest(com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key key,
boolean forWrite,
boolean upgrade)
Creates a new lock request. |
(package private) void |
releaseAll()
Release all locks. |
(package private) void |
setConflictIfNeeded(LockConflict<com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key> conflict)
Sets the specified conflict if this locker does not have a conflict set. |
(package private) void |
setDescription(com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key key,
Object description)
Sets the description associated with a key for this locker. |
String |
toString()
Returns a string representation of this object. |
| Methods inherited from class com.sun.sgs.impl.util.lock.TxnLocker |
|---|
clearConflict, getConflict, getLockTimeoutTime, getRequestedStartTime, getTransaction, setConflict |
| Methods inherited from class com.sun.sgs.impl.util.lock.Locker |
|---|
getLockManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
LockingAccessCoordinator.LockerImpl(TxnLockManager<com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key> lockManager,
Transaction txn,
long requestedStartTime)
lockManager - the lock manager for this lockertxn - the associated transactionrequestedStartTime - the time milliseconds that the task
associated with the transaction was originally
requested to start
IllegalArgumentException - if requestedStartTime
is less than 0| Method Detail |
|---|
protected LockRequest<com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key> newLockRequest(com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key key,
boolean forWrite,
boolean upgrade)
The default implementation creates and returns an instance of LockRequest.
This implementation records the new request and uses a local class.
newLockRequest in class Locker<com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key>key - the key that identifies the lockforWrite - whether the request is for writeupgrade - whether the request is for an upgrade
void releaseAll()
public String toString()
toString in class Objectpublic List<AccessedObject> getAccessedObjects()
getAccessedObjects in interface AccessedObjectsDetailList of AccessedObjectspublic AccessedObjectsDetail.ConflictType getConflictType()
getConflictType in interface AccessedObjectsDetailConflictTypepublic byte[] getConflictingId()
getConflictingId in interface AccessedObjectsDetailnull if there was no conflict or the accessor
is unknown
void setDescription(com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key key,
Object description)
null. Does not replace an
existing description.
key - the keydescription - the descriptionObject getDescription(com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key key)
key - the key
nullvoid setConflictIfNeeded(LockConflict<com.sun.sgs.impl.kernel.LockingAccessCoordinator.Key> conflict)
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||