com.sun.sgs.impl.service.nodemap
Class NodeMapUtil

java.lang.Object
  extended by com.sun.sgs.impl.service.nodemap.NodeMapUtil

final class NodeMapUtil
extends Object

Static utility methods used by both the server and service for data service name bindings.


Field Summary
(package private) static int MAJOR_VERSION
          The major and minor version numbers for the layout of keys and data persisted by the node mapping service.
(package private) static int MINOR_VERSION
           
(package private) static String VERSION_KEY
          The version key.
 
Method Summary
(package private) static String getIdentityKey(Identity id)
          Returns a identity key for the given id.
(package private) static String getNodeKey(long nodeId, Identity id)
          Returns a node key for the given nodeId and id.
(package private) static String getPartialNodeKey(long nodeId)
          Returns a node key for the given nodeId; used for iterating through a node for all identities assigned to it.
(package private) static String getPartialStatusKey(Identity id)
          Returns a status key for a given id.
(package private) static String getPartialStatusKey(Identity id, long nodeId)
          Returns a status key for the given id and nodeId.
(package private) static String getStatusKey(Identity id, long nodeId, String serviceName)
          Returns a status key for the given id, nodeId, and serviceName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAJOR_VERSION

static final int MAJOR_VERSION
The major and minor version numbers for the layout of keys and data persisted by the node mapping service.

See Also:
Constant Field Values

MINOR_VERSION

static final int MINOR_VERSION
See Also:
Constant Field Values

VERSION_KEY

static final String VERSION_KEY
The version key.

See Also:
Constant Field Values
Method Detail

getIdentityKey

static String getIdentityKey(Identity id)
Returns a identity key for the given id.


getNodeKey

static String getNodeKey(long nodeId,
                         Identity id)
Returns a node key for the given nodeId and id.


getPartialNodeKey

static String getPartialNodeKey(long nodeId)
Returns a node key for the given nodeId; used for iterating through a node for all identities assigned to it.


getStatusKey

static String getStatusKey(Identity id,
                           long nodeId,
                           String serviceName)
Returns a status key for the given id, nodeId, and serviceName. The status mappings are held per identity per node.


getPartialStatusKey

static String getPartialStatusKey(Identity id,
                                  long nodeId)
Returns a status key for the given id and nodeId. Used for finding all status entries for an identity on a particular node.


getPartialStatusKey

static String getPartialStatusKey(Identity id)
Returns a status key for a given id. Used for finding all status entries for an identity (on all nodes).


RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved