View Javadoc

1   /*
2    * Created on 11 Nov 2007
3    *
4    */
5   package org.sourceforge.jemm.lifecycle;
6   
7   
8   /**
9    * This is the internal interface used by JEMMObjects to handle their
10   * interaction with the underlying store.
11   * 
12   * @author Rory Graves
13   * @author Paul Keeble
14   */
15  public interface ShadowUserObject extends ShadowObject {
16      /**
17       * Acquire the synchronisation lock 
18       * the object is up to date with the current store version.
19       */
20      void beginLock();
21      
22      /**
23       * Acquire the synchronisation lock on the given object.
24       * @param obj The target object to synchronise on.
25       */
26      void beginLock(Object obj);
27  
28      /**
29       * Release the held read or write lock.
30       */
31      void endLock();
32      
33      /**
34       * Release the held read or write lock on the given object.
35       * @param obj The target object to synchronise on.
36       */
37      void endLock(Object obj);
38  
39      /**
40       * Signifies the beginning of a method execution
41       * 
42       */ 
43      void entityEntered(String methodSignature);
44      
45      /**
46       * Signifies the end of a method execution
47       */ 
48      void entityExited(String methodSignature);
49  
50      /**
51       * Returns the ShadowData structure associated with this ShadowObject and
52       * the enhanced class which contains all the Object data.
53       * 
54       * @return The data object instance.
55       */
56      ShadowData getData();
57  }