| java.lang.Object com.tc.object.bytecode.ManagerUtil
ManagerUtil | public class ManagerUtil (Code) | | A bunch of static methods that make calling Manager method much easier from instrumented classes
|
Method Summary | |
public static void | addClusterEventListener(ClusterEventListener cel) | public static void | arraycopy(Object src, int srcPos, Object dest, int destPos, int length) | public static void | beginLock(String lockID, int type) | public static void | beginVolatile(TCObject tcObject, String fieldName, int type) | public static void | beginVolatileByOffset(Object pojo, long fieldOffset, int type) | public static void | byteOrBooleanArrayChanged(Object array, int index, byte value) | public static void | charArrayChanged(char[] array, int index, char value) | public static void | charArrayCopy(char[] src, int srcPos, char[] dest, int destPos, int length, TCObject tco) | public static void | checkWriteAccess(Object context) | public static void | commitLock(String lockID) | public static void | commitVolatile(TCObject tcObject, String fieldName) | public static void | commitVolatileByOffset(Object pojo, long fieldOffset) | public static Object | createOrReplaceRoot(String rootName, Object object) Create or replace root, typically used for replaceable roots. | public static Object | deepCopy(Object pojo) | public static boolean | distributedMethodCall(Object receiver, String method, Object[] params) | public static void | distributedMethodCallCommit() | public static void | doubleArrayChanged(double[] array, int index, double value) | public static void | enable() Called when initialization has proceeded enough that the Manager can be used. | public static void | floatArrayChanged(float[] array, int index, float value) | public static Object | get(Object array, int index) | public static String | getClientID() | public static TCLogger | getLogger(String loggerName) | public static Manager | getManager() | public static TCObject | getObject(Object array) | public static int | getSessionLockType(String appName) | public static SessionMonitorMBean | getSessionMonitorMBean() | public static TCProperties | getTCProperties() | public static void | intArrayChanged(int[] array, int index, int value) | public static boolean | isCreationInProgress() Check whether a creation is in progress. | public static boolean | isDsoMonitorEntered(Object obj) | public static boolean | isDsoMonitored(Object obj) | public static boolean | isFieldPortableByOffset(Object pojo, long fieldOffset) | public static boolean | isHeldByCurrentThread(Object obj, int lockLevel) | public static boolean | isLocked(Object obj, int lockLevel) | public static boolean | isLogical(Object obj) | public static boolean | isManaged(Object obj) | public static boolean | isPhysicallyInstrumented(Class clazz) | public static boolean | isRoot(Field field) | public static int | localHeldCount(Object obj, int lockLevel) | public static void | logicalInvoke(Object object, String methodName, Object[] params) | public static void | logicalInvokeWithTransaction(Object object, Object lockObject, String methodName, Object[] params) | public static void | longArrayChanged(long[] array, int index, long value) | public static TCObject | lookupExistingOrNull(Object pojo) | public static Object | lookupObject(ObjectID id) | public static Object | lookupObjectWithParentContext(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 static TCObject | lookupOrCreate(Object obj) | public static Object | lookupOrCreateRoot(String name, Object object) | public static Object | lookupOrCreateRootNoDepth(String name, Object obj) Look up or create a new root object. | public static Object | lookupRoot(String name) | public static void | monitorEnter(Object obj, int type) | public static void | monitorExit(Object obj) | public static void | objectArrayChanged(Object[] array, int index, Object value) | public static void | objectNotify(Object obj) | public static void | objectNotifyAll(Object obj) | public static void | objectWait0(Object obj) | public static void | objectWait1(Object obj, long millis) | public static void | objectWait2(Object obj, long millis, int nanos) | public static void | optimisticBegin() | public static void | optimisticCommit() | public static void | optimisticRollback() | public static boolean | prunedDistributedMethodCall(Object receiver, String method, Object[] params) | public static int | queueLength(Object obj) | public static void | register(Object pojo, TCObject obj) Register an array with its TCO. | public static void | set(Object array, int index, Object value) This method is part of java.lang.reflect.Array and does the same as the set() method in the Sun JDK, the IBM
version of the set method just adds a series of argument checks and then delegates to the native setImpl version. | public static void | setBoolean(Object array, int index, boolean z) | public static void | setByte(Object array, int index, byte b) | public static void | setChar(Object array, int index, char c) | public static void | setDouble(Object array, int index, double d) | public static void | setFloat(Object array, int index, float f) | public static void | setImpl(Object array, int index, Object value) This method is part of java.lang.reflect.Array and does the same as the set() method in the Sun JDK, the IBM
version of the set method just adds a series of argument checks and then delegates to the native setImpl version. | public static void | setInt(Object array, int index, int i) | public static void | setLong(Object array, int index, long l) | public static void | setShort(Object array, int index, short s) | public static TCObject | shareObjectIfNecessary(Object pojo) | public static void | shortArrayChanged(short[] array, int index, short value) | public static boolean | tryBeginLock(String lockID, int type) | public static boolean | tryMonitorEnter(Object obj, long timeoutInNanos, int type) | public static int | waitLength(Object obj) |
addClusterEventListener | public static void addClusterEventListener(ClusterEventListener cel)(Code) | | Add listener for cluster events
Parameters: cel - Listener |
arraycopy | public static void arraycopy(Object src, int srcPos, Object dest, int destPos, int length)(Code) | | Handle System.arraycopy() semantics with managed arrays
Parameters: src - Source array Parameters: srcPos - Start index in source Parameters: dest - Destination array Parameters: destPos - Destination start index Parameters: length - Number of items to copy throws: NullPointerException - If src or dest is null |
beginLock | public static void beginLock(String lockID, int type)(Code) | | Begin lock
Parameters: lockID - Lock identifier Parameters: type - Lock type |
beginVolatile | public static void beginVolatile(TCObject tcObject, String fieldName, int type)(Code) | | Begin volatile lock
Parameters: tcObject - TCObject to lock Parameters: fieldName - Field name holding volatile object Parameters: type - Lock type |
beginVolatileByOffset | public static void beginVolatileByOffset(Object pojo, long fieldOffset, int type)(Code) | | Begin volatile lock by field offset in the class
Parameters: pojo - Instance containing field Parameters: fieldOffset - Field offset in pojo Parameters: type - Lock level |
byteOrBooleanArrayChanged | public static void byteOrBooleanArrayChanged(Object array, int index, byte value)(Code) | | Indicate that byte or boolean in array changed
Parameters: array - The array Parameters: index - The index into array Parameters: value - The new value |
charArrayChanged | public static void charArrayChanged(char[] array, int index, char value)(Code) | | Indicate that char in array changed
Parameters: array - The array Parameters: index - The index into array Parameters: value - The new value |
charArrayCopy | public static void charArrayCopy(char[] src, int srcPos, char[] dest, int destPos, int length, TCObject tco)(Code) | | Copy char[]
Parameters: src - Source array Parameters: srcPos - Start in src Parameters: dest - Destination array Parameters: destPos - Start in dest Parameters: length - Number of items to copy Parameters: tcDest - TCObject for dest array |
commitLock | public static void commitLock(String lockID)(Code) | | Commit lock
Parameters: lockID - Lock name |
commitVolatile | public static void commitVolatile(TCObject tcObject, String fieldName)(Code) | | Commit volatile lock
Parameters: tcObject - Volatile object TCObject Parameters: fieldName - Field holding the volatile object |
commitVolatileByOffset | public static void commitVolatileByOffset(Object pojo, long fieldOffset)(Code) | | Commit volatile lock by field offset in the class
Parameters: pojo - Instance containing field Parameters: fieldOffset - Field offset in pojo |
createOrReplaceRoot | public static Object createOrReplaceRoot(String rootName, Object object)(Code) | | Create or replace root, typically used for replaceable roots.
Parameters: rootName - Root name Parameters: object - Root object Root object used |
deepCopy | public static Object deepCopy(Object pojo)(Code) | | Deep copy the source object graph
Parameters: source - Source object The copy |
distributedMethodCall | public static boolean distributedMethodCall(Object receiver, String method, Object[] params)(Code) | | Perform distributed method call on all nodes
Parameters: receiver - The receiver object Parameters: method - The method to call Parameters: params - The parameter values |
distributedMethodCallCommit | public static void distributedMethodCallCommit()(Code) | | Commit DMI call
|
doubleArrayChanged | public static void doubleArrayChanged(double[] array, int index, double value)(Code) | | Indicate that double in array changed
Parameters: array - The array Parameters: index - The index into array Parameters: value - The new value |
enable | public static void enable()(Code) | | Called when initialization has proceeded enough that the Manager can be used.
|
floatArrayChanged | public static void floatArrayChanged(float[] array, int index, float value)(Code) | | Indicate that float in array changed
Parameters: array - The array Parameters: index - The index into array Parameters: value - The new value |
getClientID | public static String getClientID()(Code) | | Get JVM Client identifier
Client identifier |
getLogger | public static TCLogger getLogger(String loggerName)(Code) | | Get the named logger
Parameters: name - Logger name The logger |
getObject | public static TCObject getObject(Object array)(Code) | | Get the TCO for an array
Parameters: array - The array instance The TCObject |
getSessionLockType | public static int getSessionLockType(String appName)(Code) | | Get session lock type for the specified app (usually WRITE or SYNCHRONOUS_WRITE)
Parameters: appName - Web app name Lock type |
intArrayChanged | public static void intArrayChanged(int[] array, int index, int value)(Code) | | Indicate that int in array changed
Parameters: array - The array Parameters: index - The index into array Parameters: value - The new value |
isCreationInProgress | public static boolean isCreationInProgress()(Code) | | Check whether a creation is in progress. This flag is set on a per-thread basis while hydrating an object from DNA.
True if in progress |
isDsoMonitorEntered | public static boolean isDsoMonitorEntered(Object obj)(Code) | | Check whether dso MonitorExist is required
True if required |
isDsoMonitored | public static boolean isDsoMonitored(Object obj)(Code) | | Check whether an object is shared
Parameters: obj - Instance True if shared |
isFieldPortableByOffset | public static boolean isFieldPortableByOffset(Object pojo, long fieldOffset)(Code) | | Returns true if the field represented by the offset is a portable field, i.e., not static and not dso transient
Parameters: pojo - Object Parameters: fieldOffset - The index true if the field is portable and false otherwise |
isHeldByCurrentThread | public static boolean isHeldByCurrentThread(Object obj, int lockLevel)(Code) | | Check whether this lock is held by the current thread
Parameters: obj - The lock Parameters: lockLevel - The lock level True if held by current thread throws: NullPointerException - If obj is null |
isLocked | public static boolean isLocked(Object obj, int lockLevel)(Code) | | Check whether an object is locked at this lockLevel
Parameters: obj - Lock Parameters: lockLevel - Lock level True if locked at this level throws: NullPointerException - If obj is null |
isLogical | public static boolean isLogical(Object obj)(Code) | | Check whether object is logically instrumented
Parameters: obj - Instance True if logically instrumented |
isManaged | public static boolean isManaged(Object obj)(Code) | | Check whether an object is managed
Parameters: obj - Instance True if managed |
isPhysicallyInstrumented | public static boolean isPhysicallyInstrumented(Class clazz)(Code) | | Determine whether this class is physically instrumented
Parameters: clazz - Class True if physically instrumented |
isRoot | public static boolean isRoot(Field field)(Code) | | Check whether field is a root
Parameters: field - Field True if root |
localHeldCount | public static int localHeldCount(Object obj, int lockLevel)(Code) | | Get number of locks held locally on this object
Parameters: obj - The lock object Parameters: lockLevel - The lock level Lock count throws: NullPointerException - If obj is null |
logicalInvoke | public static void logicalInvoke(Object object, String methodName, Object[] params)(Code) | | Perform invoke on logical managed object
Parameters: object - The object Parameters: methodName - The method to call Parameters: params - The parameters to the method |
logicalInvokeWithTransaction | public static void logicalInvokeWithTransaction(Object object, Object lockObject, String methodName, Object[] params)(Code) | | Perform invoke on logical managed object in lock
Parameters: object - The object Parameters: lockObject - The lock object Parameters: methodName - The method to call Parameters: params - The parameters to the method |
longArrayChanged | public static void longArrayChanged(long[] array, int index, long value)(Code) | | Indicate that long in array changed
Parameters: array - The array Parameters: index - The index into array Parameters: value - The new value |
lookupExistingOrNull | public static TCObject lookupExistingOrNull(Object pojo)(Code) | | Find managed object, which may be null
Parameters: pojo - The object instance The TCObject |
lookupObject | public static Object lookupObject(ObjectID id)(Code) | | Look up object by ID, faulting into the JVM if necessary
Parameters: id - Object identifier The actual object throws: TCClassNotFoundException - If a class is not found during faulting |
lookupObjectWithParentContext | public static Object lookupObjectWithParentContext(ObjectID id, ObjectID parentContext)(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.
XXX::FIXME:: This method is not called lookupObject() coz ManagerHelperFactory doesn't allow method overloading.
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 |
lookupOrCreate | public static TCObject lookupOrCreate(Object obj)(Code) | | Find or create new TCObject
Parameters: obj - The object instance The TCObject |
lookupOrCreateRoot | public static Object lookupOrCreateRoot(String name, Object object)(Code) | | Look up or create a new root object
Parameters: name - Root name Parameters: object - Root object to use if none exists yet The root object actually used, may or may not == object |
lookupOrCreateRootNoDepth | public static Object lookupOrCreateRootNoDepth(String name, Object obj)(Code) | | Look up or create a new root object. Objects faulted in to arbitrary depth.
Parameters: name - Root name Parameters: obj - Root object to use if none exists yet The root object actually used, may or may not == object |
lookupRoot | public static Object lookupRoot(String name)(Code) | | Lookup root by name
Parameters: name - Name of root Root object |
monitorEnter | public static void monitorEnter(Object obj, int type)(Code) | | Enter synchronized monitor
Parameters: obj - Object Parameters: type - Lock type |
monitorExit | public static void monitorExit(Object obj)(Code) | | Exit synchronized monitor
Parameters: obj - Object |
objectArrayChanged | public static void objectArrayChanged(Object[] array, int index, Object value)(Code) | | Indicate that object in array changed
Parameters: array - The array Parameters: index - The index into array Parameters: value - The new value |
objectNotify | public static void objectNotify(Object obj)(Code) | | Perform notify on obj
Parameters: obj - Instance |
objectNotifyAll | public static void objectNotifyAll(Object obj)(Code) | | Perform notifyAll on obj
Parameters: obj - Instance |
objectWait1 | public static void objectWait1(Object obj, long millis) throws InterruptedException(Code) | | Perform timed wait on obj
Parameters: obj - Instance Parameters: millis - Wait time |
objectWait2 | public static void objectWait2(Object obj, long millis, int nanos) throws InterruptedException(Code) | | Perform timed wait on obj
Parameters: obj - Instance Parameters: millis - Wait time Parameters: nonas - More wait time |
optimisticBegin | public static void optimisticBegin()(Code) | | Begin an optimistic transaction
|
optimisticCommit | public static void optimisticCommit()(Code) | | Commit an optimistic transaction
throws: ClassNotFoundException - If class not found while faulting in object |
optimisticRollback | public static void optimisticRollback()(Code) | | Rollback an optimistic transaction
|
prunedDistributedMethodCall | public static boolean prunedDistributedMethodCall(Object receiver, String method, Object[] params)(Code) | | Perform distributed method call on just this node
Parameters: receiver - The receiver object Parameters: method - The method to call Parameters: params - The parameter values |
queueLength | public static int queueLength(Object obj)(Code) | | Number in queue waiting on this lock
Parameters: obj - The object Number of waiters throws: NullPointerException - If obj is null |
register | public static void register(Object pojo, TCObject obj)(Code) | | Register an array with its TCO. It is an error to register an array that has already been registered.
Parameters: array - Array Parameters: tco - TCObject throws: NullPointerException - if array or tco are null |
shareObjectIfNecessary | public static TCObject shareObjectIfNecessary(Object pojo)(Code) | | Parameters: pojo - Object instance TCObject for pojo |
shortArrayChanged | public static void shortArrayChanged(short[] array, int index, short value)(Code) | | Indicate that short in array changed
Parameters: array - The array Parameters: index - The index into array Parameters: value - The new value |
tryBeginLock | public static boolean tryBeginLock(String lockID, int type)(Code) | | Try to begin lock
Parameters: lockID - Lock identifier Parameters: type - Lock type True if lock was successful |
tryMonitorEnter | public static boolean tryMonitorEnter(Object obj, long timeoutInNanos, int type)(Code) | | Try to enter monitor for specified object
Parameters: obj - The object monitor Parameters: timeoutInNanos - Timeout in nanoseconds Parameters: type - The lock level True if entered throws: NullPointerException - If obj is null |
waitLength | public static int waitLength(Object obj)(Code) | | Number in queue waiting on this wait()
Parameters: obj - The object Number of waiters throws: NullPointerException - If obj is null |
|
|