public final class ObjectTracker
extends java.lang.Object
Constructor | Description |
---|---|
ObjectTracker() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
allObjectStates() |
|
void |
clear() |
Reset ObjectTracker's state.
|
ClassMolder |
getMolderForObject(java.lang.Object o) |
Retrieve the ClassMolder associated with a specific object.
|
java.lang.Object |
getObjectForOID(LockEngine engine,
OID oid,
boolean allowReadOnly) |
Retrieve the object for a given OID.
|
java.util.Collection |
getObjectsWithCreatingStateSortedByLowestMolderPriority() |
Retrieve the list of 'creating' objects (to be created), sorted in the
order they should be created.
|
java.util.Collection |
getObjectsWithDeletedStateSortedByHighestMolderPriority() |
Retrieve the list of 'deleted' objects, sorted in the order they should be
deleted.
|
java.util.Collection |
getObjectsWithUpdateCacheNeededState() |
|
OID |
getOIDForObject(java.lang.Object o) |
|
java.util.Collection |
getReadOnlyObjects() |
Retrieve the list of all read-only objects being tracked.
|
java.util.Collection |
getReadWriteObjects() |
Retrieve the list of all read-write objects being tracked.
|
boolean |
isCreated(java.lang.Object o) |
|
boolean |
isCreating(java.lang.Object o) |
|
boolean |
isDeleted(java.lang.Object o) |
|
boolean |
isReadOnly(java.lang.Object o) |
|
boolean |
isReadWrite(java.lang.Object object) |
Returns true if the specified object is tracked as a read-write object.
|
boolean |
isTracking(java.lang.Object object) |
Determine whether an object is being tracked within this tracking manager.
|
boolean |
isUpdateCacheNeeded(java.lang.Object object) |
Returns true if the cache needs to be updated for the given object.
|
boolean |
isUpdatePersistNeeded(java.lang.Object object) |
Returns true if the given object needs to be written to the persistence store.
|
void |
markCreated(java.lang.Object object) |
|
void |
markCreating(java.lang.Object object) |
|
void |
markDeleted(java.lang.Object object) |
|
void |
markReadOnly(java.lang.Object o) |
|
void |
markUpdateCacheNeeded(java.lang.Object object) |
|
void |
markUpdatePersistNeeded(java.lang.Object object) |
|
java.lang.String |
objectStateToString(java.lang.Object obj) |
Returns the object's state.
|
int |
readOnlySize() |
|
int |
readWriteSize() |
|
void |
removeOIDForObject(LockEngine engine,
OID oid) |
For a given lockengine and OID, remove references to an object in the maps.
|
void |
setOIDForObject(java.lang.Object obj,
LockEngine engine,
OID oid) |
For a given lockengine and OID, set the object in the maps.
|
void |
trackObject(ClassMolder molder,
OID oid,
java.lang.Object object) |
|
void |
trackOIDChange(java.lang.Object obj,
LockEngine engine,
OID oldoid,
OID newoid) |
Record changes to an OID by re-tracking the OID information.
|
void |
unmarkAllDeleted() |
|
void |
unmarkDeleted(java.lang.Object object) |
|
void |
unmarkReadOnly(java.lang.Object o) |
|
void |
unmarkUpdateCacheNeeded(java.lang.Object object) |
|
void |
unmarkUpdatePersistNeeded(java.lang.Object object) |
|
void |
untrackObject(java.lang.Object object) |
public java.lang.Object getObjectForOID(LockEngine engine, OID oid, boolean allowReadOnly)
engine
- Lock engine mapped to oidoid
- Object id specifiedallowReadOnly
- Allow (or ignore, if false) read-only objects to be returned.public boolean isReadWrite(java.lang.Object object)
object
- Object instance for which it should be determined whether
it's tracked as read-write objectpublic void unmarkAllDeleted()
public void clear()
public boolean isUpdateCacheNeeded(java.lang.Object object)
object
- An object instancepublic boolean isUpdatePersistNeeded(java.lang.Object object)
object
- An object instancepublic void markUpdateCacheNeeded(java.lang.Object object)
public void unmarkUpdateCacheNeeded(java.lang.Object object)
public java.util.Collection getObjectsWithUpdateCacheNeededState()
public void markUpdatePersistNeeded(java.lang.Object object)
public void unmarkUpdatePersistNeeded(java.lang.Object object)
public void markCreating(java.lang.Object object) throws PersistenceException
PersistenceException
public void markCreated(java.lang.Object object)
public void markDeleted(java.lang.Object object)
public void unmarkDeleted(java.lang.Object object)
public boolean isTracking(java.lang.Object object)
object
- The object for which it should be determined whether it is tracked.public void trackOIDChange(java.lang.Object obj, LockEngine engine, OID oldoid, OID newoid)
obj
- The object to record a tracking change for.engine
- The engine which is responsible for the old and new OIDoldoid
- The old oid.newoid
- The new oid.public void setOIDForObject(java.lang.Object obj, LockEngine engine, OID oid)
obj
- The object to trackengine
- The engine to which the OID belongsoid
- The OID of the object to trackpublic void removeOIDForObject(LockEngine engine, OID oid)
engine
- The engine to stop tracking the OID foroid
- The oid of the object to stop tracking on.public boolean isCreating(java.lang.Object o)
public boolean isCreated(java.lang.Object o)
public boolean isDeleted(java.lang.Object o)
public ClassMolder getMolderForObject(java.lang.Object o)
o
- Object instance the associated ClassMolder should be retrieved.public java.util.Collection getReadWriteObjects()
public java.util.Collection getReadOnlyObjects()
public java.util.Collection getObjectsWithCreatingStateSortedByLowestMolderPriority()
public java.util.Collection getObjectsWithDeletedStateSortedByHighestMolderPriority()
public void trackObject(ClassMolder molder, OID oid, java.lang.Object object)
public void untrackObject(java.lang.Object object)
public OID getOIDForObject(java.lang.Object o)
public boolean isReadOnly(java.lang.Object o)
public void markReadOnly(java.lang.Object o)
public void unmarkReadOnly(java.lang.Object o)
public int readOnlySize()
public int readWriteSize()
public java.lang.String allObjectStates()
public java.lang.String objectStateToString(java.lang.Object obj)
obj
- Object for which its state should be output.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com