|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DistributedState
DistributedState is a service on top of HAPartition that provides a cluster-wide distributed state. The DistributedState (DS) service provides a <String category, Serializable key, Serializable value> tuple map. Thus, any service, application, container, ... can request its own DS "private space" by working* in its own category (a string name). You work in a category like a Dictionary: you set values by key within a category. Each time a value is added/modified/removed, the modification is made cluster-wide, on all other nodes. Reading values is always made locally (no network access!) Objects can also subscribe to DS events to be notified when values are modified/removed/added in a particular category.
HAPartition| Nested Class Summary | |
|---|---|
static interface |
DistributedState.DSListener
Deprecated. use the DSListenerEx instead |
static interface |
DistributedState.DSListenerEx
Deprecated. A generalization of the DSListener that supports the Serializable key type. |
| Method Summary | |
|---|---|
Serializable |
get(String category,
Serializable key)
Deprecated. Read in a value associated to a key in the given category. |
Collection |
getAllCategories()
Deprecated. Return a list of all categories. |
Collection |
getAllKeys(String category)
Deprecated. Return a list of all keys in a category. |
Collection |
getAllValues(String category)
Deprecated. Return a list of all values in a category. |
void |
registerDSListener(String category,
DistributedState.DSListener subscriber)
Deprecated. Subscribes to receive DistributedState.DSListener events |
void |
registerDSListenerEx(String category,
DistributedState.DSListenerEx subscriber)
Deprecated. Subscribes to receive DistributedState.DSListenerEx events |
Serializable |
remove(String category,
Serializable key)
Deprecated. Remove the key from the ReplicationService in the given category |
Serializable |
remove(String category,
Serializable key,
boolean asynchronousCall)
Deprecated. Same as remove(String, String) but caller can choose if the call is made synchronously or asynchronously. |
void |
set(String category,
Serializable key,
Serializable value)
Deprecated. Associates a value to a key in a specific category |
void |
set(String category,
Serializable key,
Serializable value,
boolean asynchronousCall)
Deprecated. Same as set(String, String) but caller can choose if the call is made synchronously or asynchronously. |
void |
unregisterDSListener(String category,
DistributedState.DSListener subscriber)
Deprecated. Unsubscribes from DistributedState.DSListener events |
void |
unregisterDSListenerEx(String category,
DistributedState.DSListenerEx subscriber)
Deprecated. Unsubscribes from DistributedState.DSListenerEx events |
| Method Detail |
|---|
void registerDSListenerEx(String category,
DistributedState.DSListenerEx subscriber)
DistributedState.DSListenerEx events
category - Name of the private-space to watch forsubscriber - Object that will receive callbacks.
void unregisterDSListenerEx(String category,
DistributedState.DSListenerEx subscriber)
DistributedState.DSListenerEx events
category - Name of the private-space dictionary currently observedsubscriber - Object currently observing this category
void registerDSListener(String category,
DistributedState.DSListener subscriber)
DistributedState.DSListener events
category - Name of the private-space to watch forsubscriber - Object that will receive callbacks.
void unregisterDSListener(String category,
DistributedState.DSListener subscriber)
DistributedState.DSListener events
category - Name of the private-space dictionary currently observedsubscriber - Object currently observing this category
void set(String category,
Serializable key,
Serializable value)
throws Exception
category - Name of the private naming-spacekey - Name of the data to setvalue - Value of the data to set
Exception - If a network exception occurs
void set(String category,
Serializable key,
Serializable value,
boolean asynchronousCall)
throws Exception
category - Name of the private naming-spacekey - Name of the data to setvalue - Value of the data to setasynchronousCall - True if the call should be asynchronous
Exception - If a network exception occurs
Serializable get(String category,
Serializable key)
category - Name of the private naming-spacekey - The key of the value to read
Collection getAllCategories()
Collection getAllKeys(String category)
category - The category under which to look for keys
Collection getAllValues(String category)
category - The category name under which to look for values
Serializable remove(String category,
Serializable key)
throws Exception
category - Name of the categorykey - Key to be removed
Exception - if a network exception occurs while removing the entry.
Serializable remove(String category,
Serializable key,
boolean asynchronousCall)
throws Exception
category - Name of the categorykey - Key to be removedasynchronousCall - True if the call should be asynchronous
Exception - if a network exception occurs while removing the entry.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||