goodsjpi
Class PessimisticMetaobject

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

public class PessimisticMetaobject
extends BasicMetaobject

PessimisticMetaobject for pessimistic scheme of synchronization.
Or would it be realistic.
Or Multiple Reader, one writer.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class goodsjpi.Metaobject
CONSTRUCTOR, EXCEPTION, MUTATOR, VARIABLE
 
Constructor Summary
PessimisticMetaobject()
           
 
Method Summary
 void beginReadAccess(Persistent obj)
          beginReadAccess is a no-op.
 void beginWriteAccess(Persistent obj)
          beginWriteAccess locks the object.
 void endAccess(Persistent obj)
          endAccess adds the object to the cahce managers transaction list
 
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

PessimisticMetaobject

public PessimisticMetaobject()
Method Detail

beginWriteAccess

public void beginWriteAccess(Persistent obj)
beginWriteAccess locks the object. That is, the objects storage manager is requested to objeain the lock from the server.

Specified by:
beginWriteAccess in class Metaobject
Parameters:
obj - a Persistent to be modified.

beginReadAccess

public void beginReadAccess(Persistent obj)
beginReadAccess is a no-op. So, no locking for read's. Multiple readers, one writer.

Specified by:
beginReadAccess in class Metaobject
Parameters:
obj - a Persistent object to be read.

endAccess

public void endAccess(Persistent obj)
endAccess adds the object to the cahce managers transaction list

Specified by:
endAccess in class Metaobject
Parameters:
obj - a Persistent value