goodsjpi
Class PessimisticRepeatableReadMetaobject

java.lang.Object
  extended bygoodsjpi.Metaobject
      extended bygoodsjpi.BasicMetaobject
          extended bygoodsjpi.PessimisticMetaobject
              extended bygoodsjpi.PessimisticRepeatableReadMetaobject
All Implemented Interfaces:
java.io.Serializable

public class PessimisticRepeatableReadMetaobject
extends PessimisticMetaobject

PessimisticRepeatableReadMetaobject for pessimistic scheme of synchronization with repeatable read isolation level
While extending the Multiple Reader, one writer aproach, this strategy obtains shred locks for reading, thus ensuring that no write is going on at the same time.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class goodsjpi.Metaobject
CONSTRUCTOR, EXCEPTION, MUTATOR, VARIABLE
 
Constructor Summary
PessimisticRepeatableReadMetaobject()
           
 
Method Summary
 void beginReadAccess(Persistent obj)
          beginReadAccess locks the object in shared mode.
 void endAccess(Persistent obj)
          endAccess adds the object to the transaction list, also when the object was not modified.
 
Methods inherited from class goodsjpi.PessimisticMetaobject
beginWriteAccess
 
Methods inherited from class goodsjpi.BasicMetaobject
abortNestedTransaction, abortTransaction, abortTransaction, beginNestedTransaction, commitObjectChanges, commitTransaction, destroyObject, endNestedTransaction, forgetObject, invalidateObject, loadObject, makePersistent, notifyOnModification, postDaemon, preDaemon, preloadObject, releaseObject, sendForgottenObjectsToServers, undoObjectChanges
 
Methods inherited from class goodsjpi.Metaobject
modify, mutator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PessimisticRepeatableReadMetaobject

public PessimisticRepeatableReadMetaobject()
Method Detail

beginReadAccess

public void beginReadAccess(Persistent obj)
beginReadAccess locks the object in shared mode.

Overrides:
beginReadAccess in class PessimisticMetaobject
Parameters:
obj - a Persistent object to be read.

endAccess

public void endAccess(Persistent obj)
endAccess adds the object to the transaction list, also when the object was not modified. Thus the (shared) lock is released.

Overrides:
endAccess in class PessimisticMetaobject
Parameters:
obj - a Persistent object