com.tc.object.bytecode
Class NullManager

java.lang.Object
  extended by com.tc.object.bytecode.NullManager
All Implemented Interfaces:
Manager, TerracottaLocking

public class NullManager
extends java.lang.Object
implements Manager

Null implementation of the manager.


Field Summary
static java.lang.String CLASS
           
static java.lang.String TYPE
           
 
Fields inherited from interface com.tc.object.bytecode.Manager
LOCK_TYPE_CONCURRENT, LOCK_TYPE_READ, LOCK_TYPE_SYNCHRONOUS_WRITE, LOCK_TYPE_WRITE
 
Method Summary
 int calculateDsoHashCode(java.lang.Object object)
          Calculate a hash code for the object that will be the same on all nodes, i.e., that does not depend on Object.hashCode().
 void checkWriteAccess(java.lang.Object context)
          Check whether current context has write access
 java.lang.Object createOrReplaceRoot(java.lang.String name, java.lang.Object object)
          Create or replace root, typically used for replaceable roots.
 boolean distributedMethodCall(java.lang.Object receiver, java.lang.String method, java.lang.Object[] params, boolean runOnAllNodes)
          Perform distributed method call
 void distributedMethodCallCommit()
          Commit DMI call
 LockID generateLockIdentifier(java.lang.Object obj)
           
 LockID generateLockIdentifier(java.lang.Object obj, java.lang.String field)
           
 LockID generateLockIdentifier(java.lang.String str)
           
 java.lang.Object getChangeApplicator(java.lang.Class clazz)
          Retrieve the customer change applicator that was registered for a particular class.
 ClassProvider getClassProvider()
          Get the ClassProvider associated with this Manager
 java.lang.String getClientID()
          Get JVM Client identifier
 DsoCluster getDsoCluster()
          Retrieves the DSO cluster instance.
static Manager getInstance()
          Get instance of the null manager
 InstrumentationLogger getInstrumentationLogger()
          Get the instrumentation logger
 TCLogger getLogger(java.lang.String loggerName)
          Get the named logger
 javax.management.MBeanServer getMBeanServer()
          Retrieves the MBean server that's used by this Terracotta client
 SessionConfiguration getSessionConfiguration(java.lang.String appName)
          Get the configuration for the given application name (ie.
 StatisticRetrievalAction getStatisticRetrievalActionInstance(java.lang.String name)
           
 TCProperties getTCProperties()
           
 TunneledDomainUpdater getTunneledDomainUpdater()
          Get the TunneledDomainUpdater associated with this Manager
 java.lang.String getUUID()
          Get unique Client identifier
 int globalHoldCount(LockID lock, LockLevel level)
          Return the count of global (cluster-wide) holders at the given lock level.
 int globalPendingCount(LockID lock)
          Return the count of global (cluster-wide) pending holders.
 int globalWaitingCount(LockID lock)
          Return the count of global (cluster-wide) waiting threads.
 void init()
          Initialize the Manager
 void initForTests()
          Initialize the Manager for running tests
 boolean isDsoMonitored(java.lang.Object obj)
          Check whether an object is shared
 boolean isDsoMonitorEntered(java.lang.Object obj)
          Check whether dso MonitorExist is required
 boolean isFieldPortableByOffset(java.lang.Object pojo, long fieldOffset)
          Returns true if the field represented by the offset is a portable field, i.e., not static and not dso transient
 boolean isLiteralAutolock(java.lang.Object o)
           
 boolean isLiteralInstance(java.lang.Object object)
           
 boolean isLocked(LockID lock, LockLevel level)
          Return true if the given lock is held by any thread at the given lock level.
 boolean isLockedByCurrentThread(LockID lock, LockLevel level)
          Return true if the given lock is held by the current thread at the given lock level.
 boolean isLockedByCurrentThread(LockLevel level)
          Return true if any lock is held by the current thread at the given lock level.
 boolean isLockHeldByCurrentThread(java.lang.String lockId, int lockLevel)
           
 boolean isLogical(java.lang.Object object)
          Check whether object is logically instrumented
 boolean isManaged(java.lang.Object object)
          Check whether an object is managed
 boolean isPhysicallyInstrumented(java.lang.Class clazz)
          Determine whether this class is physically instrumented
 boolean isRoot(java.lang.reflect.Field field)
          Check whether field is a root
 int localHeldCount(java.lang.Object obj, int lockLevel)
           
 int localHoldCount(LockID lock, LockLevel level)
          Return the count of local (on this client VM) holders at the given lock level.
 void lock(LockID lock, LockLevel level)
          Blocking acquire of a Terracotta lock.
 void lockInterruptibly(LockID lock, LockLevel level)
          Interruptible acquire of a Terracotta lock.
 void logicalInvoke(java.lang.Object object, java.lang.String methodName, java.lang.Object[] params)
          Perform invoke on logical managed object
 void logicalInvokeWithTransaction(java.lang.Object object, java.lang.Object lockObject, java.lang.String methodName, java.lang.Object[] params)
          Perform invoke on logical managed object in lock
 TCObjectExternal lookupExistingOrNull(java.lang.Object obj)
          Find managed object, which may be null
 java.lang.Object lookupObject(ObjectID id)
          Look up object by ID, faulting into the JVM if necessary
 java.lang.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.
 TCObjectExternal lookupOrCreate(java.lang.Object obj)
          Find or create new TCObjectExternal
 java.lang.Object lookupOrCreateRoot(java.lang.String name, java.lang.Object object)
          Look up or create a new root object
 java.lang.Object lookupOrCreateRootNoDepth(java.lang.String name, java.lang.Object obj)
          Look up or create a new root object.
 java.lang.Object lookupRoot(java.lang.String name)
          Lookup root by name
 void monitorEnter(LockID lock, LockLevel level)
          Used by instrumented code to perform a clustered monitorenter.
 void monitorExit(LockID lock, LockLevel level)
          Used by instrumented code to perform a clustered monitorexit.
 Notify notify(LockID lock, java.lang.Object waitObject)
          Notify a single thread waiting on the given lock.
 Notify notifyAll(LockID lock, java.lang.Object waitObject)
          Notify all threads waiting on the given lock.
 boolean overridesHashCode(java.lang.Object obj)
          Returns true if the given object overrides hashCode() from java.lang.Object.
 void pinLock(LockID lock)
           
 void preFetchObject(ObjectID id)
          Prefetch object by ID, faulting into the JVM if necessary, Async lookup and will not cause ObjectNotFoundException like lookupObject.
 void registerBeforeShutdownHook(java.lang.Runnable beforeShutdownHook)
          Registers a hook that will be called before shutting down this client
 void registerNamedLoader(NamedClassLoader loader, java.lang.String webAppName)
          Register a named classloader with Terracotta.
 void registerStatisticRetrievalAction(StatisticRetrievalAction sra)
           
 void stop()
          Stop the manager
 boolean tryLock(LockID lock, LockLevel level)
          Try to acquire a Terracotta lock.
 boolean tryLock(LockID lock, LockLevel level, long timeout)
          Timed acquire of a Terracotta lock.
 void unlock(LockID lock, LockLevel level)
          Blocking unlock of a Terracotta lock.
 void unpinLock(LockID lock)
           
 void wait(LockID lock, java.lang.Object waitObject)
          Move the current thread to wait on the given lock.
 void wait(LockID lock, java.lang.Object waitObject, long timeout)
          Move the current thread to wait on the given lock with timeout.
 void waitForAllCurrentTransactionsToComplete()
          Used by BulkLoad to wait for all current transactions completed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS

public static final java.lang.String CLASS
See Also:
Constant Field Values

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values
Method Detail

getInstance

public static Manager getInstance()
Get instance of the null manager

Returns:
NullManager

init

public void init()
Description copied from interface: Manager
Initialize the Manager

Specified by:
init in interface Manager

initForTests

public void initForTests()
Description copied from interface: Manager
Initialize the Manager for running tests

Specified by:
initForTests in interface Manager

stop

public void stop()
Description copied from interface: Manager
Stop the manager

Specified by:
stop in interface Manager

lookupOrCreateRoot

public java.lang.Object lookupOrCreateRoot(java.lang.String name,
                                           java.lang.Object object)
Description copied from interface: Manager
Look up or create a new root object

Specified by:
lookupOrCreateRoot in interface Manager
Parameters:
name - Root name
object - Root object to use if none exists yet
Returns:
The root object actually used, may or may not == object

lookupOrCreateRootNoDepth

public java.lang.Object lookupOrCreateRootNoDepth(java.lang.String name,
                                                  java.lang.Object obj)
Description copied from interface: Manager
Look up or create a new root object. Objects faulted in to arbitrary depth.

Specified by:
lookupOrCreateRootNoDepth in interface Manager
Parameters:
name - Root name
obj - Root object to use if none exists yet
Returns:
The root object actually used, may or may not == object

createOrReplaceRoot

public java.lang.Object createOrReplaceRoot(java.lang.String name,
                                            java.lang.Object object)
Description copied from interface: Manager
Create or replace root, typically used for replaceable roots.

Specified by:
createOrReplaceRoot in interface Manager
Parameters:
name - Root name
object - Root object
Returns:
Root object used

lookupExistingOrNull

public TCObjectExternal lookupExistingOrNull(java.lang.Object obj)
Description copied from interface: Manager
Find managed object, which may be null

Specified by:
lookupExistingOrNull in interface Manager
Parameters:
obj - The object instance
Returns:
The TCObject

logicalInvoke

public void logicalInvoke(java.lang.Object object,
                          java.lang.String methodName,
                          java.lang.Object[] params)
Description copied from interface: Manager
Perform invoke on logical managed object

Specified by:
logicalInvoke in interface Manager
Parameters:
object - The object
methodName - The method to call
params - The parameters to the method

distributedMethodCall

public boolean distributedMethodCall(java.lang.Object receiver,
                                     java.lang.String method,
                                     java.lang.Object[] params,
                                     boolean runOnAllNodes)
Description copied from interface: Manager
Perform distributed method call

Specified by:
distributedMethodCall in interface Manager
Parameters:
receiver - The receiver object
method - The method to call
params - The parameter values
runOnAllNodes - True if should run on all nodes, false just for this node

distributedMethodCallCommit

public void distributedMethodCallCommit()
Description copied from interface: Manager
Commit DMI call

Specified by:
distributedMethodCallCommit in interface Manager

checkWriteAccess

public void checkWriteAccess(java.lang.Object context)
Description copied from interface: Manager
Check whether current context has write access

Specified by:
checkWriteAccess in interface Manager
Parameters:
context - Context object

isManaged

public boolean isManaged(java.lang.Object object)
Description copied from interface: Manager
Check whether an object is managed

Specified by:
isManaged in interface Manager
Parameters:
object - Instance
Returns:
True if managed

isLiteralInstance

public boolean isLiteralInstance(java.lang.Object object)
Specified by:
isLiteralInstance in interface Manager
Returns:
true if obj is an instance of a literal type, e.g., Class, Integer, etc.

isLiteralAutolock

public boolean isLiteralAutolock(java.lang.Object o)
Specified by:
isLiteralAutolock in interface Manager
Returns:
true if obj is an instance of a literal type and is suitable for cluster-wide locking,

calculateDsoHashCode

public int calculateDsoHashCode(java.lang.Object object)
Description copied from interface: Manager
Calculate a hash code for the object that will be the same on all nodes, i.e., that does not depend on Object.hashCode(). For objects that override hashCode(), the object's hashCode() will be used; for literals that use Object.hashCode(), like Class, a stable hash code will be computed. Note that for objects that override hashCode() but that still base the result on Object.hashCode() the result of this method may still be unstable.

Specified by:
calculateDsoHashCode in interface Manager

isLogical

public boolean isLogical(java.lang.Object object)
Description copied from interface: Manager
Check whether object is logically instrumented

Specified by:
isLogical in interface Manager
Parameters:
object - Instance
Returns:
True if logically instrumented

isRoot

public boolean isRoot(java.lang.reflect.Field field)
Description copied from interface: Manager
Check whether field is a root

Specified by:
isRoot in interface Manager
Parameters:
field - Field
Returns:
True if root

lookupRoot

public java.lang.Object lookupRoot(java.lang.String name)
Description copied from interface: Manager
Lookup root by name

Specified by:
lookupRoot in interface Manager
Parameters:
name - Name of root
Returns:
Root object

isLockHeldByCurrentThread

public boolean isLockHeldByCurrentThread(java.lang.String lockId,
                                         int lockLevel)

logicalInvokeWithTransaction

public void logicalInvokeWithTransaction(java.lang.Object object,
                                         java.lang.Object lockObject,
                                         java.lang.String methodName,
                                         java.lang.Object[] params)
Description copied from interface: Manager
Perform invoke on logical managed object in lock

Specified by:
logicalInvokeWithTransaction in interface Manager
Parameters:
object - The object
lockObject - The lock object
methodName - The method to call
params - The parameters to the method

isPhysicallyInstrumented

public boolean isPhysicallyInstrumented(java.lang.Class clazz)
Description copied from interface: Manager
Determine whether this class is physically instrumented

Specified by:
isPhysicallyInstrumented in interface Manager
Parameters:
clazz - Class
Returns:
True if physically instrumented

getClientID

public java.lang.String getClientID()
Description copied from interface: Manager
Get JVM Client identifier

Specified by:
getClientID in interface Manager
Returns:
Client identifier

getLogger

public TCLogger getLogger(java.lang.String loggerName)
Description copied from interface: Manager
Get the named logger

Specified by:
getLogger in interface Manager
Parameters:
loggerName - Logger name
Returns:
The logger

lookupOrCreate

public TCObjectExternal lookupOrCreate(java.lang.Object obj)
Description copied from interface: Manager
Find or create new TCObjectExternal

Specified by:
lookupOrCreate in interface Manager
Parameters:
obj - The object instance
Returns:
The TCObjectExternal

lookupObject

public java.lang.Object lookupObject(ObjectID id)
Description copied from interface: Manager
Look up object by ID, faulting into the JVM if necessary

Specified by:
lookupObject in interface Manager
Parameters:
id - Object identifier
Returns:
The actual object

lookupObject

public java.lang.Object lookupObject(ObjectID id,
                                     ObjectID parentContext)
Description copied from interface: Manager
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.

Specified by:
lookupObject in interface Manager
Parameters:
id - Object identifier of the object we are looking up
parentContext - Object identifier of the parent object
Returns:
The actual object

getTCProperties

public TCProperties getTCProperties()
Specified by:
getTCProperties in interface Manager
Returns:
TCProperties

localHeldCount

public int localHeldCount(java.lang.Object obj,
                          int lockLevel)

isDsoMonitored

public boolean isDsoMonitored(java.lang.Object obj)
Description copied from interface: Manager
Check whether an object is shared

Specified by:
isDsoMonitored in interface Manager
Parameters:
obj - Instance
Returns:
True if shared

isDsoMonitorEntered

public boolean isDsoMonitorEntered(java.lang.Object obj)
Description copied from interface: Manager
Check whether dso MonitorExist is required

Specified by:
isDsoMonitorEntered in interface Manager
Returns:
True if required

isFieldPortableByOffset

public boolean isFieldPortableByOffset(java.lang.Object pojo,
                                       long fieldOffset)
Description copied from interface: Manager
Returns true if the field represented by the offset is a portable field, i.e., not static and not dso transient

Specified by:
isFieldPortableByOffset in interface Manager
Parameters:
pojo - Object
fieldOffset - The index
Returns:
true if the field is portable and false otherwise

getInstrumentationLogger

public InstrumentationLogger getInstrumentationLogger()
Description copied from interface: Manager
Get the instrumentation logger

Specified by:
getInstrumentationLogger in interface Manager

overridesHashCode

public boolean overridesHashCode(java.lang.Object obj)
Description copied from interface: Manager
Returns true if the given object overrides hashCode() from java.lang.Object. Enum types are NOT considered to override hashCode()

Specified by:
overridesHashCode in interface Manager

registerNamedLoader

public void registerNamedLoader(NamedClassLoader loader,
                                java.lang.String webAppName)
Description copied from interface: Manager
Register a named classloader with Terracotta.

Specified by:
registerNamedLoader in interface Manager
webAppName - corresponds to the name of a web-application in the TC config, or null if the classloader being registered is not associated with a web application.

getClassProvider

public ClassProvider getClassProvider()
Description copied from interface: Manager
Get the ClassProvider associated with this Manager

Specified by:
getClassProvider in interface Manager

getTunneledDomainUpdater

public TunneledDomainUpdater getTunneledDomainUpdater()
Description copied from interface: Manager
Get the TunneledDomainUpdater associated with this Manager

Specified by:
getTunneledDomainUpdater in interface Manager

getDsoCluster

public DsoCluster getDsoCluster()
Description copied from interface: Manager
Retrieves the DSO cluster instance.

Specified by:
getDsoCluster in interface Manager
Returns:
the DSO cluster instance for this manager

getMBeanServer

public javax.management.MBeanServer getMBeanServer()
Description copied from interface: Manager
Retrieves the MBean server that's used by this Terracotta client

Specified by:
getMBeanServer in interface Manager
Returns:
the MBean server for this client

preFetchObject

public void preFetchObject(ObjectID id)
Description copied from interface: Manager
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.

Specified by:
preFetchObject in interface Manager
Parameters:
id - Object identifier

getStatisticRetrievalActionInstance

public StatisticRetrievalAction getStatisticRetrievalActionInstance(java.lang.String name)
Specified by:
getStatisticRetrievalActionInstance in interface Manager

getChangeApplicator

public java.lang.Object getChangeApplicator(java.lang.Class clazz)
Description copied from interface: Manager
Retrieve the customer change applicator that was registered for a particular class.

Specified by:
getChangeApplicator in interface Manager
Parameters:
clazz - The class for which the custom change application has to be returned
Returns:
the instance of the custom change applicator; or null if no custom applicator was registered for this class

generateLockIdentifier

public LockID generateLockIdentifier(java.lang.String str)
Specified by:
generateLockIdentifier in interface TerracottaLocking

generateLockIdentifier

public LockID generateLockIdentifier(java.lang.Object obj)
Specified by:
generateLockIdentifier in interface TerracottaLocking

generateLockIdentifier

public LockID generateLockIdentifier(java.lang.Object obj,
                                     java.lang.String field)
Specified by:
generateLockIdentifier in interface TerracottaLocking

globalHoldCount

public int globalHoldCount(LockID lock,
                           LockLevel level)
Description copied from interface: TerracottaLocking
Return the count of global (cluster-wide) holders at the given lock level.

This method has unusual semantics similar to isLocked.

Specified by:
globalHoldCount in interface TerracottaLocking
Parameters:
lock - lock to query
level - level to query
See Also:
TerracottaLocking.isLocked(LockID, LockLevel)

globalPendingCount

public int globalPendingCount(LockID lock)
Description copied from interface: TerracottaLocking
Return the count of global (cluster-wide) pending holders.

This method has unusual semantics similar to isLocked.

Specified by:
globalPendingCount in interface TerracottaLocking
Parameters:
lock - lock to query
See Also:
TerracottaLocking.isLocked(LockID, LockLevel)

globalWaitingCount

public int globalWaitingCount(LockID lock)
Description copied from interface: TerracottaLocking
Return the count of global (cluster-wide) waiting threads.

This method has unusual semantics similar to isLocked.

Specified by:
globalWaitingCount in interface TerracottaLocking
Parameters:
lock - lock to query
See Also:
TerracottaLocking.isLocked(LockID, LockLevel)

isLocked

public boolean isLocked(LockID lock,
                        LockLevel level)
Description copied from interface: TerracottaLocking
Return true if the given lock is held by any thread at the given lock level.

The semantics of this method are fairly loose when using a greedy locking policy. It is assumed that a client holding a greedy lock has in turn one holding thread of each possible type.

It is also important to note that the current locking implementation does not track concurrent lock holds.

Specified by:
isLocked in interface TerracottaLocking
Parameters:
lock - lock to query
level - level to query

isLockedByCurrentThread

public boolean isLockedByCurrentThread(LockID lock,
                                       LockLevel level)
Description copied from interface: TerracottaLocking
Return true if the given lock is held by the current thread at the given lock level.

It is also important to note that the current locking implementation does not track concurrent lock holds.

Specified by:
isLockedByCurrentThread in interface TerracottaLocking
Parameters:
lock - lock to query
level - level to query

localHoldCount

public int localHoldCount(LockID lock,
                          LockLevel level)
Description copied from interface: TerracottaLocking
Return the count of local (on this client VM) holders at the given lock level.

Specified by:
localHoldCount in interface TerracottaLocking
Parameters:
lock - lock to query
level - level to query

lock

public void lock(LockID lock,
                 LockLevel level)
Description copied from interface: TerracottaLocking
Blocking acquire of a Terracotta lock.

Specified by:
lock in interface TerracottaLocking
Parameters:
lock - lock to act upon
level - level at which to lock

lockInterruptibly

public void lockInterruptibly(LockID lock,
                              LockLevel level)
Description copied from interface: TerracottaLocking
Interruptible acquire of a Terracotta lock.

Specified by:
lockInterruptibly in interface TerracottaLocking
Parameters:
lock - lock to act upon
level - level at which to lock

notify

public Notify notify(LockID lock,
                     java.lang.Object waitObject)
Description copied from interface: TerracottaLocking
Notify a single thread waiting on the given lock.

Specified by:
notify in interface TerracottaLocking
Parameters:
lock - lock to act upon
waitObject - local vm object on which threads are waiting

notifyAll

public Notify notifyAll(LockID lock,
                        java.lang.Object waitObject)
Description copied from interface: TerracottaLocking
Notify all threads waiting on the given lock.

Specified by:
notifyAll in interface TerracottaLocking
Parameters:
lock - lock to act upon
waitObject - local vm object on which threads are waiting

tryLock

public boolean tryLock(LockID lock,
                       LockLevel level)
Description copied from interface: TerracottaLocking
Try to acquire a Terracotta lock.

Non-blocking try acquires will wait for a definitive server response - in this sense they are not truly non-blocking...

Specified by:
tryLock in interface TerracottaLocking
Parameters:
lock - lock to act upon
level - level at which to lock
Returns:
true if locked

tryLock

public boolean tryLock(LockID lock,
                       LockLevel level,
                       long timeout)
Description copied from interface: TerracottaLocking
Timed acquire of a Terracotta lock.

Specified by:
tryLock in interface TerracottaLocking
Parameters:
lock - lock to act upon
level - level at which to lock
timeout - maximum time to wait in milliseconds
Returns:
true if locked

unlock

public void unlock(LockID lock,
                   LockLevel level)
Description copied from interface: TerracottaLocking
Blocking unlock of a Terracotta lock.

Specified by:
unlock in interface TerracottaLocking
Parameters:
lock - lock to act upon
level - at which to unlock

wait

public void wait(LockID lock,
                 java.lang.Object waitObject)
          throws java.lang.InterruptedException
Description copied from interface: TerracottaLocking
Move the current thread to wait on the given lock.

Specified by:
wait in interface TerracottaLocking
Parameters:
lock - lock to act upon
waitObject - local vm object to wait on
Throws:
java.lang.InterruptedException

wait

public void wait(LockID lock,
                 java.lang.Object waitObject,
                 long timeout)
          throws java.lang.InterruptedException
Description copied from interface: TerracottaLocking
Move the current thread to wait on the given lock with timeout.

Specified by:
wait in interface TerracottaLocking
Parameters:
lock - lock to act upon
waitObject - local vm object to wait on
timeout - maximum time to remain waiting
Throws:
java.lang.InterruptedException

pinLock

public void pinLock(LockID lock)
Specified by:
pinLock in interface TerracottaLocking

unpinLock

public void unpinLock(LockID lock)
Specified by:
unpinLock in interface TerracottaLocking

isLockedByCurrentThread

public boolean isLockedByCurrentThread(LockLevel level)
Description copied from interface: TerracottaLocking
Return true if any lock is held by the current thread at the given lock level.

It is also important to note that the current locking implementation does not track concurrent lock holds.

Specified by:
isLockedByCurrentThread in interface TerracottaLocking
Parameters:
level - level to query

monitorEnter

public void monitorEnter(LockID lock,
                         LockLevel level)
Description copied from interface: Manager
Used by instrumented code to perform a clustered monitorenter.

Specified by:
monitorEnter in interface Manager

monitorExit

public void monitorExit(LockID lock,
                        LockLevel level)
Description copied from interface: Manager
Used by instrumented code to perform a clustered monitorexit.

Implementations of this method should prevent propagation of all Throwable instances. Instead Throwable instances are logged and the client VM is then terminated. If you don't want this behavior then don't call this method.

This behavior is there to ensure that exceptions thrown during transaction commit or clustered unlocking do not cause the thread to enter an infinite loop.

Specified by:
monitorExit in interface Manager
See Also:
DEV-113

getUUID

public java.lang.String getUUID()
Description copied from interface: Manager
Get unique Client identifier

Specified by:
getUUID in interface Manager
Returns:
unique Client identifier

getSessionConfiguration

public SessionConfiguration getSessionConfiguration(java.lang.String appName)
Description copied from interface: Manager
Get the configuration for the given application name (ie. context path)

Specified by:
getSessionConfiguration in interface Manager
Returns:
null if the given app is not configured for clustering

waitForAllCurrentTransactionsToComplete

public void waitForAllCurrentTransactionsToComplete()
Description copied from interface: Manager
Used by BulkLoad to wait for all current transactions completed

Specified by:
waitForAllCurrentTransactionsToComplete in interface Manager

registerBeforeShutdownHook

public void registerBeforeShutdownHook(java.lang.Runnable beforeShutdownHook)
Description copied from interface: Manager
Registers a hook that will be called before shutting down this client

Specified by:
registerBeforeShutdownHook in interface Manager

registerStatisticRetrievalAction

public void registerStatisticRetrievalAction(StatisticRetrievalAction sra)
Specified by:
registerStatisticRetrievalAction in interface Manager


Copyright © 2010 Terracotta, Inc.. All Rights Reserved.