|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--arlut.csd.ganymede.DBDeletionManager
The DBDeletionManager class is used to handle deletion locking
in the Ganymede DBStore.
| Field Summary | |
private static java.util.Hashtable |
invids
A hashtable mapping Invid
objects to a Vector of DBSession objects. |
private static java.util.Hashtable |
sessions
A hashtable mapping DBSession objects to a Vector of Invid objects. |
| Constructor Summary | |
DBDeletionManager()
|
|
| Method Summary | |
static boolean |
addSessionInvids(arlut.csd.ganymede.DBSession session,
java.util.Vector invidList)
This method deletion-locks a vector of invids, returning false without changes if the deletion-locks could not all be performed. |
static boolean |
deleteLockObject(arlut.csd.ganymede.DBObject obj,
arlut.csd.ganymede.DBSession session)
This method is used by the Invid binding logic to attempt to block an object from being deleted. |
static java.util.Vector |
getSessionCheckpoint(arlut.csd.ganymede.DBSession session)
This method returns a snapshot of what Invids are locked by a given session at the time the method is called. |
static void |
releaseSession(arlut.csd.ganymede.DBSession session)
When a DBSession releases or commits a transaction, this method is called to clear any deletion locks asserted by it. |
static void |
revertSessionCheckpoint(arlut.csd.ganymede.DBSession session,
java.util.Vector invidList)
This method rolls back the invids delete-locked by a session to an earlier state. |
static boolean |
setDeleteStatus(arlut.csd.ganymede.DBEditObject obj,
arlut.csd.ganymede.DBSession session)
This method is used by the DBSession deleteDBObject() method to safely convert a DBEditObject's status to a deletion state. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static java.util.Hashtable sessions
A hashtable mapping DBSession objects to a Vector of Invid objects.
DBSession will appear as keys in this hash when those sessions have locked Invids in the database against deletion. The Vector of Invids mapped from the DBSession is the list of Invids that that DBSession has locked.
private static java.util.Hashtable invids
A hashtable mapping Invid
objects to a Vector of DBSession objects.
Invids will appear as keys in this hash when the DBObjects corresponding to those Invids have been delete locked by DBSessions in the server. The Vector of DBSession objects is the list of DBSessions that have locked the Invid.
| Constructor Detail |
public DBDeletionManager()
| Method Detail |
public static boolean deleteLockObject(arlut.csd.ganymede.DBObject obj,
arlut.csd.ganymede.DBSession session)
This method is used by the Invid binding logic to attempt to block an object from being deleted. If this method returns true, the object will be forbidden from being deleted until such time as the DBSession that asserted the lock clears it.
public static boolean setDeleteStatus(arlut.csd.ganymede.DBEditObject obj,
arlut.csd.ganymede.DBSession session)
This method is used by the DBSession deleteDBObject() method to safely convert a DBEditObject's status to a deletion state. This method returns true if the object was able to be converted to a deletion state, or false if the object has been deletion locked by another DBSession.
public static void releaseSession(arlut.csd.ganymede.DBSession session)
When a DBSession releases or commits a transaction, this method is called to clear any deletion locks asserted by it.
public static boolean addSessionInvids(arlut.csd.ganymede.DBSession session,
java.util.Vector invidList)
This method deletion-locks a vector of invids, returning false without changes if the deletion-locks could not all be performed.
public static java.util.Vector getSessionCheckpoint(arlut.csd.ganymede.DBSession session)
This method returns a snapshot of what Invids are locked by a given session at the time the method is called. It is used by the DBEditSet checkpoint code to allow a transaction to checkpoint the objects that the transaction had delete-locked at a moment in time. With revertSessionCheckpoint(), below, a transaction can provisionally carry out some object linkages which delete-locks objects, then undo those additional locks if the transaction is rolled back.
public static void revertSessionCheckpoint(arlut.csd.ganymede.DBSession session,
java.util.Vector invidList)
This method rolls back the invids delete-locked by a session to an earlier state. revertSessionCheckpoint() cannot cause more invids to be delete-locked.. the only effect it can have is to undelete-lock invids that were provisionally delete-locked by session between a checkpoint and rollback.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||