Goods.Metaobject Class
Metaobject is a base class for all Transaction + locking strategies. ObjectHeader holds a MetaObject, which is called when the object is modified or read. This also means you can have different strategies for different classes, or even object if you wish. The default is PessimisticRepeatableRead. This class has abstract functions to handle loading and unloading of Object over the wire, and to handle Transactions. Specifically their failure strategies are implemented by different implementations of the various derived classes. Most functions are implemented in the BasicMetaObject, but the begin/end * Access functions are implemented in the different derived classes. JAVAMOP, the MetaObjectProtocol postprocessor inserts all necessary code to call MetaObject functions into the compiled byte code.

Access: Public
Base Classes: Object
  Members Description  
    preDaemon Invocation of this preDaemon is inserted by MOP generator before each method invocation or object component access. (Other database implementation call this method fetch(), to indicate that this causes the data of the Object to be fetched, if it's not already there) The exact call that is inserted is super.metaobject.preDaemon(this, attr);

 
    postDaemon Invocation of this postDaemon is inserted by MOP generator after each method invocation or object component access. The inserted code is something like: super.metaobject.postDaemon(this,attr,flag)

 
    MUTATOR MUTATOR == 1 , means object can be changed

 
    VARIABLE VARIABLE == 2 , means access to non-self instance variable

 
    CONSTRUCTOR CONSTRUCTOR == 4 means wrapped method is constructor

 
    EXCEPTION EXCEPTION == 8, means method is terminated by exception

 
    preloadObject preloadObject is called by Storage.read() when it's bytes have been received and just before they are copied into it's data member

 
    loadObject loadObject is not so much the loading of the Object, ,but a notification thereof. The object is really loaded by the Storage class (in prepare(obj) method) and after the deed is done, this method is called.

 
    forgetObject forgetObject is called when the objects finalize() is called, if it's opid is still valid. If all data were local, this would mean the object could be destroyed because it's not reachable anymore. But because more references may exist at the servers end, this basically reduces the reference count at the servers side. Server side garbage collection will eventually reclaim the object space, if it really has become unreachable.

 
    releaseObject releaseObject is called during a commitTransaction, for objects that have not been modified.

 
    commitObjectChanges commitObjectChanges is called during commitTransaction.

 
    undoObjectChanges undoObjectChanges is called during an abortTransaction.

 
    makePersistent makeObjectHeader should do just that, make the obj ObjectHeader.

 
    beginReadAccess beginReadAccess is called when the read Access begins. It is called from the (auto generated) preDeamon (in BasicMataObject) if the Mutator flag is set. Different implementations of this function can be found in the subclasses and by eg locking or not locking the Object provide different strategies.

 
    beginWriteAccess beginWriteAccess is called when the write Access begins. It is called from the (autogenerated) preDeamon (in BasicMataObject) if the Mutator flag is not set. Different implementations of this function can be found in the subclasses and by eg locking or not locking the Object provide different strategies.

 
    endAccess endAccess is called when the (current) access/function has ended, and the object is not accessed anymore (the accesscount hits 0 ). It is called from the (autogenerated) postDeamon in BasiMetaObject. Different implementations of this function can be found in the subclasses and by eg locking or not locking the Object provide different strategies.

 
    invalidateObject This method is asynchronously called by server storag agent when deterioration notification from server is received.

 
    destroyObject Destoroy all object references to make it possible to provide more unaccessible objects to GC

 
    notifyOnModification Enable or disable notification on receving invalidation messages from the server for this object.