/** * Commit lock * * @param lockID Lock name * @throws AbortedOperationException */ protected static void commitLock(final Object lockID, final LockLevel level) throws AbortedOperationException { Manager mgr = getManager(); LockID lock = mgr.generateLockIdentifier(lockID); mgr.unlock(lock, level); }
protected static void pinLock0(final String lockID) { Manager mgr = getManager(); LockID lock = mgr.generateLockIdentifier(lockID); mgr.pinLock(lock); }
/** * Perform notify on obj * * @param obj Instance * @throws AbortedOperationException */ protected static void objectNotify(final Object obj) throws AbortedOperationException { Manager mgr = getManager(); LockID lock = mgr.generateLockIdentifier(obj); mgr.notify(lock, obj); }
protected static void lockIDNotify(final Object lockID) throws AbortedOperationException { Manager mgr = getManager(); LockID lock = mgr.generateLockIdentifier(lockID); mgr.lockIDNotify(lock); }
/** * Perform notifyAll on obj * * @param obj Instance * @throws AbortedOperationException */ protected static void objectNotifyAll(final Object obj) throws AbortedOperationException { Manager mgr = getManager(); LockID lock = mgr.generateLockIdentifier(obj); mgr.notifyAll(lock, obj); }
/** * Register a {@code Runnable} to be called before the client is shutdown. * * @param beforeShutdownHook runnable to be called */ public static void registerBeforeShutdownHook(Runnable beforeShutdownHook) { ManagerUtil.getManager().registerBeforeShutdownHook(beforeShutdownHook); } }
/** * Get the named logger * * @param loggerName Logger name * @return The logger */ public static TCLogger getLogger(final String loggerName) { return getManager().getLogger(loggerName); }
/** * Find or create new TCObject * * @param obj The object instance * @return The TCObject */ protected static TCObject lookupOrCreate(final Object obj, GroupID gid) { return getManager().lookupOrCreate(obj, gid); }
/** * Create or replace root, typically used for replaceable roots. * * @param rootName Root name * @param object Root object * @return Root object used * @throws AbortedOperationException */ protected static Object createOrReplaceRoot(final String rootName, final Object object) throws AbortedOperationException { return getManager().createOrReplaceRoot(rootName, object); }
/** * Lookup root by name * * @param name Name of root * @return Root object * @throws AbortedOperationException */ protected static Object lookupRoot(final String name) throws AbortedOperationException { return getManager().lookupRoot(name); }
/** * Perform invoke on logical managed object * * @param object The object * @param methodName The method to call * @param params The parameters to the method */ protected static void logicalInvoke(final Object object, final String methodName, final Object[] params) { getManager().logicalInvoke(object, methodName, params); }
/** * Prefetch object by ID, faulting into the JVM if necessary, Async lookup and will not cause ObjectNotFoundException * like lookupObject. Non-existent objects are ignored by the server. * * @param id Object identifier * @throws AbortedOperationException */ protected static void preFetchObject(final ObjectID id) throws AbortedOperationException { getManager().preFetchObject(id); }
/** * Check whether current context has write access * * @param context Context object * @throws com.tc.object.util.ReadOnlyException If in read-only transaction */ protected static void checkWriteAccess(final Object context) { getManager().checkWriteAccess(context); }
/** * Get Unique Client identifier * * @return Unique Client identifier */ protected static String getUUID() { return getManager().getUUID(); }
/** * Check whether object is logically instrumented * * @param obj Instance * @return True if logically instrumented */ protected static boolean isLogical(final Object obj) { return getManager().isLogical(obj); }
/** * Check whether field is a root * * @param field Field * @return True if root */ protected static boolean isRoot(final Field field) { return getManager().isRoot(field); }
/** * Commit DMI call */ protected static void distributedMethodCallCommit() { getManager().distributedMethodCallCommit(); }
/** * Perform distributed method call on just this node * * @param receiver The receiver object * @param method The method to call * @param params The parameter values */ protected static boolean prunedDistributedMethodCall(final Object receiver, final String method, final Object[] params) { return getManager().distributedMethodCall(receiver, method, params, false); }
protected static void lockIDNotify(final Object lockID) throws AbortedOperationException { Manager mgr = getManager(); LockID lock = mgr.generateLockIdentifier(lockID); mgr.lockIDNotify(lock); }
/** * Find or create new TCObject * * @param obj The object instance * @return The TCObject */ protected static TCObject lookupOrCreate(final Object obj, GroupID gid) { return getManager().lookupOrCreate(obj, gid); }