|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.j_spaces.core.client.MetaDataEntry
com.j_spaces.map.Command
public class Command
Command
is an Entry
which is used to
define notification events fired by Central (~Remote) space . This is used as a
way for a local space to synchronize its change with all other local spaces which are
connected to same Central (~Remote) space. When a local space
takes/updates an entry, an appropriate Command
is written
to the Central (~Remote) space to have it notify all its local spaces so that all local
spaces can learn about the change and synchronize with one other.
For internal use only!
Nested Class Summary | |
---|---|
static interface |
Command.Action
The command action types. |
Field Summary | |
---|---|
Byte |
action
The action performed. |
String |
cacheID
The cache id. |
String[] |
uids
The Entries uids. |
Constructor Summary | |
---|---|
Command()
No arguments constructor. |
|
Command(String[] uids,
byte action,
String cacheID)
Constructor with uid , action and cacheID . |
|
Command(String uid,
byte action,
String cacheID)
Constructor with uid and action . |
Method Summary | |
---|---|
static String[] |
__getSpaceIndexedFields()
Make an index for hash-based load balancing. |
static Command |
createTakeCommand(String[] uids,
String cacheID)
Utility method to create a command with uids and take action. |
static Command |
createTakeCommand(String uid,
String cacheID)
Utility method to create a command with uid and take action. |
static Command |
createUpdateCommand(String[] uids,
String cacheID)
Utility method to create a command with uids and update action. |
static Command |
createUpdateCommand(String uid,
String cacheID)
Utility method to create a command with uid and update action. |
String |
getCacheID()
Returns the cache id. |
Methods inherited from class com.j_spaces.core.client.MetaDataEntry |
---|
__getEntryInfo, __setEntryInfo, isFifo, isNOWriteLeaseMode, isTransient, makePersistent, makeTransient, setFifo, setNOWriteLeaseMode |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public String cacheID
public String[] uids
public Byte action
Constructor Detail |
---|
public Command()
public Command(String uid, byte action, String cacheID)
uid
and action
.
uid
- UID of the entry that is being affected (taken or updated)action
- defines what happened to the entry with uid
. ACTION_TAKE/ACTION_UPDATE
cacheID
- a unique cache idpublic Command(String[] uids, byte action, String cacheID)
uid
, action
and cacheID
.
uids
- UIDs of the entries that are being affected (taken or updated)action
- defines what happened to the entries with uids
. taken/updatedcacheID
- a unique cache idMethod Detail |
---|
public static Command createTakeCommand(String uid, String cacheID)
uid
and take action.
Such command defines that entry with uid
is taken from the cache.
uid
- of the entry being affectedcacheID
- a unique cache id
uid
is taken from the cache.public static Command createTakeCommand(String[] uids, String cacheID)
uids
and take action.
Such command defines that entries with uids
are taken to the cache.
uids
- of the entries being affectedcacheID
- a unique cache id
uids
are taken from the cache.public static Command createUpdateCommand(String uid, String cacheID)
uid
and update action.
Such command defines that entry with uid
is updated in the cache.
uid
- of the entry being affectedcacheID
- a unique cache id
uid
is updated in the cache.public static Command createUpdateCommand(String[] uids, String cacheID)
uids
and update action.
Such command defines that entries with uids
are updated in the cache.
uids
- of the entries being affectedcacheID
- a unique cache id
uids
are updated in the cache.public String getCacheID()
public static String[] __getSpaceIndexedFields()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |