|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.api.Terracotta
public abstract class Terracotta
A static-accessor for the advanced functionality of the current (classloader scoped) client instance.
| Constructor Summary | |
|---|---|
Terracotta()
|
|
| Method Summary | ||
|---|---|---|
static boolean |
disableEviction(Object o)
Attempt to disable eviction for the given clustered object. |
|
static boolean |
enableEviction(Object o)
Attempt to enabled eviction for the given clustered object. |
|
static boolean |
isActive()
Returns true if the cluster is active. |
|
static boolean |
isManaged(Object o)
Returns true if this object is managed by the cluster. |
|
static
|
lookupOrCreateRoot(String name,
Callable<T> creator)
Create a cluster-heap root using the given name, and creator function. |
|
static void |
registerBeforeShutdownHook(Runnable beforeShutdownHook)
Register a Runnable to be called before the client is shutdown. |
|
static void |
waitForAllCurrentTransactionsToComplete()
Causes the calling thread to be suspended until all outstanding transactions have been persisted within the cluster. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Terracotta()
| Method Detail |
|---|
public static <T> T lookupOrCreateRoot(String name,
Callable<T> creator)
If a root with the given identifier already exists then its value is returned. If not then the creator is called, and the returned value is installed as a new root.
If the existing value for this root is not compatible with the generic return type of the method invocation then a
ClassCastException is thrown.
T - type of the held objectname - identifier for the rootcreator - function that returns the object to store
ClassCastException - if the root exists but holds a non-compatible typepublic static boolean isManaged(Object o)
true if this object is managed by the cluster.
o - query object.
true if managedpublic static boolean isActive()
true if the cluster is active.
true if activepublic static boolean disableEviction(Object o)
If eviction is disabled, then this object will remain in the local heap on the VM from which this method was called.
o - target object
true if eviction was disabledpublic static boolean enableEviction(Object o)
If eviction is enabled, then the cluster is free to remove this object from the local heap on the VM from which this method is called.
o - target object
true if eviction was enabledpublic static void waitForAllCurrentTransactionsToComplete()
public static void registerBeforeShutdownHook(Runnable beforeShutdownHook)
Runnable to be called before the client is shutdown.
beforeShutdownHook - runnable to be called
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||