|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Manager
The Manager interface
Field Summary | |
---|---|
static java.lang.String |
CLASS
This class's class path: com/tc/object/bytecode/Manager |
static int |
LOCK_TYPE_CONCURRENT
|
static int |
LOCK_TYPE_READ
|
static int |
LOCK_TYPE_SYNCHRONOUS_WRITE
|
static int |
LOCK_TYPE_WRITE
|
static java.lang.String |
TYPE
Bytecode type definition for this class |
Method Summary | |
---|---|
int |
calculateDsoHashCode(java.lang.Object obj)
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 rootName,
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 |
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. |
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 |
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 obj)
|
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 |
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 . |
boolean |
overridesHashCode(java.lang.Object obj)
Returns true if the given object overrides hashCode() from java.lang.Object. |
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 |
void |
waitForAllCurrentTransactionsToComplete()
Used by BulkLoad to wait for all current transactions completed |
Methods inherited from interface com.tc.object.locks.TerracottaLocking |
---|
generateLockIdentifier, generateLockIdentifier, generateLockIdentifier, globalHoldCount, globalPendingCount, globalWaitingCount, isLocked, isLockedByCurrentThread, isLockedByCurrentThread, localHoldCount, lock, lockInterruptibly, notify, notifyAll, pinLock, tryLock, tryLock, unlock, unpinLock, wait, wait |
Field Detail |
---|
static final java.lang.String CLASS
static final java.lang.String TYPE
static final int LOCK_TYPE_READ
static final int LOCK_TYPE_WRITE
static final int LOCK_TYPE_CONCURRENT
static final int LOCK_TYPE_SYNCHRONOUS_WRITE
Method Detail |
---|
boolean isPhysicallyInstrumented(java.lang.Class clazz)
clazz
- Class
void init()
void initForTests()
void stop()
java.lang.Object lookupOrCreateRoot(java.lang.String name, java.lang.Object object)
name
- Root nameobject
- Root object to use if none exists yet
java.lang.Object lookupOrCreateRootNoDepth(java.lang.String name, java.lang.Object obj)
name
- Root nameobj
- Root object to use if none exists yet
java.lang.Object createOrReplaceRoot(java.lang.String rootName, java.lang.Object object)
rootName
- Root nameobject
- Root object
java.lang.Object lookupObject(ObjectID id) throws java.lang.ClassNotFoundException
id
- Object identifier
java.lang.ClassNotFoundException
void preFetchObject(ObjectID id)
id
- Object identifierjava.lang.Object lookupObject(ObjectID id, ObjectID parentContext) throws java.lang.ClassNotFoundException
id
- Object identifier of the object we are looking upparentContext
- Object identifier of the parent object
TCClassNotFoundException
- If a class is not found during faulting
java.lang.ClassNotFoundException
TCObjectExternal lookupExistingOrNull(java.lang.Object obj)
obj
- The object instance
TCObjectExternal lookupOrCreate(java.lang.Object obj)
obj
- The object instance
void logicalInvoke(java.lang.Object object, java.lang.String methodName, java.lang.Object[] params)
object
- The objectmethodName
- The method to callparams
- The parameters to the methodvoid logicalInvokeWithTransaction(java.lang.Object object, java.lang.Object lockObject, java.lang.String methodName, java.lang.Object[] params)
object
- The objectlockObject
- The lock objectmethodName
- The method to callparams
- The parameters to the methodboolean distributedMethodCall(java.lang.Object receiver, java.lang.String method, java.lang.Object[] params, boolean runOnAllNodes)
receiver
- The receiver objectmethod
- The method to callparams
- The parameter valuesrunOnAllNodes
- True if should run on all nodes, false just for this nodevoid distributedMethodCallCommit()
java.lang.Object lookupRoot(java.lang.String name)
name
- Name of root
void checkWriteAccess(java.lang.Object context)
context
- Context object
com.tc.object.util.ReadOnlyException
- If in read-only transactionint calculateDsoHashCode(java.lang.Object obj)
boolean isLiteralInstance(java.lang.Object obj)
literal type
, e.g., Class, Integer,
etc.boolean isManaged(java.lang.Object object)
object
- Instance
boolean isLiteralAutolock(java.lang.Object o)
literal type
and is suitable for
cluster-wide locking,boolean isDsoMonitored(java.lang.Object obj)
obj
- Instance
boolean isDsoMonitorEntered(java.lang.Object obj)
java.lang.Object getChangeApplicator(java.lang.Class clazz)
clazz
- The class for which the custom change application has to be returned
null
if no custom applicator was registered for
this classboolean isLogical(java.lang.Object object)
object
- Instance
boolean isRoot(java.lang.reflect.Field field)
field
- Field
java.lang.String getClientID()
java.lang.String getUUID()
TCLogger getLogger(java.lang.String loggerName)
loggerName
- Logger name
InstrumentationLogger getInstrumentationLogger()
TCProperties getTCProperties()
boolean isFieldPortableByOffset(java.lang.Object pojo, long fieldOffset)
pojo
- ObjectfieldOffset
- The index
boolean overridesHashCode(java.lang.Object obj)
void registerNamedLoader(NamedClassLoader loader, java.lang.String webAppName)
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.ClassProvider getClassProvider()
TunneledDomainUpdater getTunneledDomainUpdater()
DsoCluster getDsoCluster()
javax.management.MBeanServer getMBeanServer()
StatisticRetrievalAction getStatisticRetrievalActionInstance(java.lang.String name)
void registerStatisticRetrievalAction(StatisticRetrievalAction sra)
void monitorEnter(LockID lock, LockLevel level)
monitorenter
.
void monitorExit(LockID lock, LockLevel level)
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.
SessionConfiguration getSessionConfiguration(java.lang.String appName)
void waitForAllCurrentTransactionsToComplete()
void registerBeforeShutdownHook(java.lang.Runnable beforeShutdownHook)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |