| com.tc.object.ClientObjectManager
All known Subclasses: com.tc.object.TestClientObjectManager, com.tc.object.ClientObjectManagerImpl,
ClientObjectManager | public interface ClientObjectManager (Code) | | Manages client-side (L1) object state in a VM.
|
Method Summary | |
public void | addPendingCreateObjectsToTransaction() Add all pending create object actions (created during traversals) to the current transaction. | public void | checkPortabilityOfField(Object value, String fieldName, Object pojo) | public void | checkPortabilityOfLogicalAction(Object[] params, int paramIndex, String methodName, Object pojo) | Object | cloneAndInvokeLogicalOperation(Object logicalPojo, String methodName, Object[] parameters) Clone logicalPojo and then apply the specified logical operation, returning the clone. | public Object | createNewCopyInstance(Object source, Object parent) | public WeakReference | createNewPeer(TCClass clazz, DNA dna) Create new peer object instance for the clazz, referred to through a WeakReference. | public WeakReference | createNewPeer(TCClass clazz, int size, ObjectID id, ObjectID parentID) Create new peer object instance for the clazz, referred to through a WeakReference. | public Object | createOrReplaceRoot(String rootName, Object root) Create or replace a root value, typically used for replacable roots. | public Object | createParentCopyInstanceIfNecessary(Map visited, Map cloned, Object v) For an inner object, create or find the containing parent instance. | public Object | deepCopy(Object source, OptimisticTransactionManager optimisticTxManager) | public Collection | getAllObjectIDsAndClear(Collection c) Get all IDs currently in the cache and add to c. | public Class | getClassFor(String className, String loaderDesc) | public TCClass | getOrCreateClass(Class clazz) | public ReferenceQueue | getReferenceQueue() | public ClientTransactionManager | getTransactionManager() | public boolean | hasPendingCreateObjects() | public boolean | isCreationInProgress() | public boolean | isManaged(Object pojo) Determine whether this instance is managed. | public boolean | isPortableClass(Class clazz) | public boolean | isPortableInstance(Object instance) | public TCObject | lookup(ObjectID id) | public ObjectID | lookupExistingObjectID(Object obj) | public TCObject | lookupExistingOrNull(Object pojo) | public TCObject | lookupIfLocal(ObjectID id) Find managed object locally (don't fault in an object from the server). | public Object | lookupObject(ObjectID id) Find object by ID. | public Object | lookupObject(ObjectID id, ObjectID parentContext) Look up object by ID, faulting into the JVM if necessary, This method also passes the parent Object context so that
more intelligent prefetching is possible at the L2. | public Object | lookupObjectNoDepth(ObjectID id) Find object by ID. | public TCObject | lookupOrCreate(Object obj) Find the managed object for this instance or create a new one if it does not
yet exist.
Parameters: obj - Instance Managed object, may be new. | public Object | lookupOrCreateRoot(String name, Object obj) Find and create if necessary a root object for the specified named root. | public Object | lookupOrCreateRoot(String name, Object obj, boolean dsoFinal) Find and create if necessary a root object for the specified named root. | public Object | lookupOrCreateRootNoDepth(String rootName, Object object) Find and create if necessary a root object for the specified named root. | public TCObject | lookupOrShare(Object pojo) Find the managed object for this instance or share. | public Object | lookupRoot(String name) | public void | markReferenced(TCObject tcobj) | public void | pause() | public void | replaceRootIDIfNecessary(String rootName, ObjectID newRootID) Replace root ID. | void | sendApplicationEvent(Object pojo, ApplicationEvent event) Send an ApplicationEvent occurring on pojo to the server via JMX. | public void | setTransactionManager(ClientTransactionManager txManager) | public void | shutdown() | public void | starting() | void | storeObjectHierarchy(Object pojo, ApplicationEventContext context) Store the pojo object hierarchy in the context's tree model. | public void | unpause() |
addPendingCreateObjectsToTransaction | public void addPendingCreateObjectsToTransaction()(Code) | | Add all pending create object actions (created during traversals) to the current transaction.
|
checkPortabilityOfLogicalAction | public void checkPortabilityOfLogicalAction(Object[] params, int paramIndex, String methodName, Object pojo) throws TCNonPortableObjectError(Code) | | Check whether logical action is portable
Parameters: params - Method call parameters Parameters: paramIndex - Parameter index Parameters: methodName - Method name Parameters: pojo - Instance throws: TCNonPortableObjectError - If logical action is not portable |
cloneAndInvokeLogicalOperation | Object cloneAndInvokeLogicalOperation(Object logicalPojo, String methodName, Object[] parameters)(Code) | | Clone logicalPojo and then apply the specified logical operation, returning the clone.
Parameters: logicalPojo - The logical object Parameters: methodName - The method name on the logical object Parameters: parameters - The parameter values The cloned object |
createNewCopyInstance | public Object createNewCopyInstance(Object source, Object parent)(Code) | | Take a source and a parent (if non-static inner) and create a new empty instance
Parameters: source - Source object Parameters: parent - Parent object New copy instance of source |
createNewPeer | public WeakReference createNewPeer(TCClass clazz, DNA dna)(Code) | | Create new peer object instance for the clazz, referred to through a WeakReference.
Parameters: clazz - The kind of class Parameters: dna - The dna defining the object instance Weak reference referring to the peer |
createNewPeer | public WeakReference createNewPeer(TCClass clazz, int size, ObjectID id, ObjectID parentID)(Code) | | Create new peer object instance for the clazz, referred to through a WeakReference.
Parameters: clazz - The kind of class Parameters: size - The size if this is an array Parameters: id - The object identifier Parameters: parentID - The parent object, if this is an inner object Weak reference referring to the peer |
createOrReplaceRoot | public Object createOrReplaceRoot(String rootName, Object root)(Code) | | Create or replace a root value, typically used for replacable roots.
Parameters: rootName - Root name Parameters: root - New root value |
createParentCopyInstanceIfNecessary | public Object createParentCopyInstanceIfNecessary(Map visited, Map cloned, Object v)(Code) | | For an inner object, create or find the containing parent instance.
Parameters: visited - Map of those objects that have been visited so far Parameters: cloned - Map of those objects that have been cloned already Parameters: v - The object The new or existing parent object clone |
deepCopy | public Object deepCopy(Object source, OptimisticTransactionManager optimisticTxManager)(Code) | | Do deep copy of source object using the transaction manager
Parameters: source - Source object Parameters: optimisticTxManager - Transaction manager to use Deep copy of source |
getAllObjectIDsAndClear | public Collection getAllObjectIDsAndClear(Collection c)(Code) | | Get all IDs currently in the cache and add to c. Clear all from remote object manager.
Parameters: c - Collection to collect IDs in c |
getOrCreateClass | public TCClass getOrCreateClass(Class clazz)(Code) | | Get or create a reference to the managed class for this clazz
Parameters: clazz - The Java class The Terracotta class |
getReferenceQueue | public ReferenceQueue getReferenceQueue()(Code) | | Get the reference queue for weakly referenced peers
Reference queue |
hasPendingCreateObjects | public boolean hasPendingCreateObjects()(Code) | | Check whether there are any currently pending create objects
True if any pending |
isCreationInProgress | public boolean isCreationInProgress()(Code) | | True if creation in progress |
isManaged | public boolean isManaged(Object pojo)(Code) | | Determine whether this instance is managed.
Parameters: pojo - The instance True if managed |
isPortableClass | public boolean isPortableClass(Class clazz)(Code) | | Determine whether this class is portable
Parameters: clazz - The class to check True if portable |
isPortableInstance | public boolean isPortableInstance(Object instance)(Code) | | Determine whether this instance is portable
Parameters: instance - The instance to check True if portable |
lookupExistingObjectID | public ObjectID lookupExistingObjectID(Object obj)(Code) | | Find identifier for existing instance
Parameters: obj - Object instance Identifier |
lookupExistingOrNull | public TCObject lookupExistingOrNull(Object pojo)(Code) | | Find managed object by instance, which may be null
Parameters: pojo - Instance Managed object if it exists, or null otherwise |
lookupIfLocal | public TCObject lookupIfLocal(ObjectID id)(Code) | | Find managed object locally (don't fault in an object from the server).
Parameters: id - Identifier Managed object or null if not in client |
lookupObject | public Object lookupObject(ObjectID id) throws ClassNotFoundException(Code) | | Find object by ID. If necessary, the object will be faulted into the JVM.
The default fault-count will be used to limit the number of dependent objects that
are also faulted in.
Parameters: id - Identifier Instance for the id throws: ClassNotFoundException - If class can't be found in this VM |
lookupObject | public Object lookupObject(ObjectID id, ObjectID parentContext) throws ClassNotFoundException(Code) | | Look up object by ID, faulting into the JVM if necessary, This method also passes the parent Object context so that
more intelligent prefetching is possible at the L2.
The default fault-count will be used to limit the number of dependent objects that
are also faulted in.
Parameters: id - Object identifier of the object we are looking up Parameters: parentContext - Object identifier of the parent object The actual object throws: TCClassNotFoundException - If a class is not found during faulting |
lookupObjectNoDepth | public Object lookupObjectNoDepth(ObjectID id) throws ClassNotFoundException(Code) | | Find object by ID. If necessary, the object will be faulted into the JVM.
No fault-count depth will be used and all dependent objects will be faulted into
memory.
Parameters: id - Identifier Instance for the id throws: ClassNotFoundException - If class can't be found in this VM |
lookupOrCreate | public TCObject lookupOrCreate(Object obj)(Code) | | Find the managed object for this instance or create a new one if it does not
yet exist.
Parameters: obj - Instance Managed object, may be new. Should never be null, but might be object representing null TCObject. |
lookupOrCreateRoot | public Object lookupOrCreateRoot(String name, Object obj)(Code) | | Find and create if necessary a root object for the specified named root.
All dependent objects needed will be faulted in, limited to the
fault-count specified in the configuration.
Parameters: name - Root name Parameters: obj - Instance to use if new New or existing object to use as root |
lookupOrCreateRoot | public Object lookupOrCreateRoot(String name, Object obj, boolean dsoFinal)(Code) | | Find and create if necessary a root object for the specified named root.
All dependent objects needed will be faulted in, limited to the
fault-count specified in the configuration.
Parameters: name - Root name Parameters: obj - Instance to use if new Parameters: dsoFinal - Specify whether this is root is considered final and whether an existing root can be replaced New or existing object to use as root |
lookupOrCreateRootNoDepth | public Object lookupOrCreateRootNoDepth(String rootName, Object object)(Code) | | Find and create if necessary a root object for the specified named root.
All dependent objects needed will be faulted in to arbitrary depth.
Parameters: rootName - Root name Parameters: object - Instance to use if new New or existing object to use as root |
lookupOrShare | public TCObject lookupOrShare(Object pojo)(Code) | | Find the managed object for this instance or share. This method is (exclusively?) used when
implementing ConcurrentHashMap sharing.
Parameters: obj - Instance Should never be null, but might be object representing null TCObject. |
lookupRoot | public Object lookupRoot(String name)(Code) | | Find named root object
Parameters: name - Root name Root object |
markReferenced | public void markReferenced(TCObject tcobj)(Code) | | Mark a managed object as referenced
Parameters: tcobj - Managed object |
pause | public void pause()(Code) | | Pause client object manager, for use while starting
|
replaceRootIDIfNecessary | public void replaceRootIDIfNecessary(String rootName, ObjectID newRootID)(Code) | | Replace root ID. Primitive roots are replaceable. Object reference roots generally are not
but this can be controlled by the configuration.
Parameters: rootName - Root object name Parameters: newRootID - New root object identifier |
sendApplicationEvent | void sendApplicationEvent(Object pojo, ApplicationEvent event)(Code) | | Send an ApplicationEvent occurring on pojo to the server via JMX.
The handling of concrete event types occurs in com.tc.objectserver.DSOApplicationEvents.
Parameters: pojo - The object Parameters: event - The event |
setTransactionManager | public void setTransactionManager(ClientTransactionManager txManager)(Code) | | Set the client transaction manager
Parameters: txManager - Transaction manager |
shutdown | public void shutdown()(Code) | | Shutdown the client object manager
|
starting | public void starting()(Code) | | Change to STARTING state
|
storeObjectHierarchy | void storeObjectHierarchy(Object pojo, ApplicationEventContext context)(Code) | | Store the pojo object hierarchy in the context's tree model.
Parameters: pojo - The object Parameters: context - The event context |
unpause | public void unpause()(Code) | | Unpause, moving state to running
|
|
|