Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.1

E36938-01


oracle.sdp.sclb.api.datacentric
Interface DataCentricUtil


public interface DataCentricUtil

This is a utility for accessing and querying the Data Centric entities, for example the consistent hash for all server instances in the cluster.

The interface is implemented by the container and is made available for applications through a ServletContext attribute via the string constant CONTEXT_ATTRIBUTE_NAME which is a member of the interface.

Example:

  :
  DataCentricUtil dcu = (DataCentricUtil) getServletContext().getAttribute(DataCentricUtil.CONTEXT_ATTRIBUTE_NAME);
  :
 

Field Summary
static String CONTEXT_ATTRIBUTE_NAME
          The identifier to be used when the DataCentricUtil interface is retrieved from the ServletContext.

 

Method Summary
 String getActualServerInstance(String key)
          Gets the actual server instance (i.e, with regard to the actual cluster shape) that is mapped to the specified key.
 String getIdealServerInstance(String key)
          Gets the server instance that would be mapped to the specified key in case the cluster is complete (i.e.
 String getLocalKey()
          Gets a key that is local for this instance regardless of cluster state, i.e.
 boolean isDataCentricEnabled()
          Checks if Data Centric is enabled on this node.
 boolean isLocal(String key)
          Checks if the specified key should be handled by the current (local) instance.

 

Field Detail

CONTEXT_ATTRIBUTE_NAME

static final String CONTEXT_ATTRIBUTE_NAME
The identifier to be used when the DataCentricUtil interface is retrieved from the ServletContext.

Method Detail

getActualServerInstance

String getActualServerInstance(String key)
Gets the actual server instance (i.e, with regard to the actual cluster shape) that is mapped to the specified key.
Parameters:
key - the key
Returns:
the server instance that is mapped to the specified key

getIdealServerInstance

String getIdealServerInstance(String key)
Gets the server instance that would be mapped to the specified key in case the cluster is complete (i.e. all servers are working).
Parameters:
key - the key
Returns:
the ideal server instance that is mapped to the specified key

isLocal

boolean isLocal(String key)
Checks if the specified key should be handled by the current (local) instance.
Parameters:
key - the key
Returns:
true if the key is mapped to the local server instance; otherwise false

getLocalKey

String getLocalKey()
Gets a key that is local for this instance regardless of cluster state, i.e. based on the ideal cluster.
Returns:
a key that is local for this instance

isDataCentricEnabled

boolean isDataCentricEnabled()
Checks if Data Centric is enabled on this node.
Returns:
true if enabled; otherwise false

Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.1

E36938-01


Copyright © 2012 Oracle Corporation. All Rights Reserved.