Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.common
Class ClusteringToken

    java.lang.Object
      oracle.ifs.common.ClusteringToken

Direct Known Subclasses:
  TieClusteringToken

    public class ClusteringToken

extends java.lang.Object

A ClusteringToken represents the state of an agent token, from the perspective of a specific instance checking its registation for the token.

(Unpublished)

Nested Class Summary
`class` | `ClusteringToken.RegistrationTypeCalculator` A RegistrationTypeCalculator calcualtes the registration type for a ClusteringToken.
`class` | `ClusteringToken.TokenState` A TokenState represents the persistent state of the token, in a form that is convenient to use by ClusteringToken operations.

Field Summary
`static java.lang.String` | `POSITIONAL_NODE_ALIAS_PREFIX` Prefix used to identify posiitonal node alias names.
`static java.lang.String[]` | `REGISTRATION_TYPE_STRINGS` String representations of the enumerated registration types.
`static int` | `SERVER_REGISTRATION_TYPE_BACKUP` The Registration type value used classify Backup server registrations.
`static int` | `SERVER_REGISTRATION_TYPE_NONE` The Registration type value used to indicate no registration.
`static int` | `SERVER_REGISTRATION_TYPE_PRIMARY` The Registration type value used classify Primary server registrations.
`static int` | `SERVER_REGISTRATION_TYPE_SECONDARY` The Registration type value used classify Secondary server registrations.
`static int` | `SERVER_REGISTRATION_TYPE_UNKNOWN` The Registration type value used to indicate no registration.

Constructor Summary
`ClusteringToken()` Constructs a ClusteringToken.

Method Summary
`protected boolean` | `challengeNode(LibrarySession session, java.lang.String nodeId)` Challenge the node token for the specified Node ID.
`protected void` | `challengeNodes(LibrarySession session, ApplicationToken appToken)` Challenge one of the nodes holding either registree or standby.
`boolean` | `checkRegistration(LibrarySession session, java.lang.Long appTokenId)` Checks the registration for this Server.
`java.lang.String` | `getAgentIdentifier()` Gets the agent identifier.
`java.lang.String` | `getClusteringStatus()` Returns the clustering status, used to publish the status of this instance.
`java.lang.String` | `getEffectiveNodeList()` Gets the effective node list, used to calculate the registration type (responsibility).
`protected int` | `getPositionInStringArray(java.lang.String value, java.lang.String[] array, boolean ignoreCase)` Return position of the specified string in the array, or -1 if it is not in the array.
`long` | `getRegistrationPeriod()` Gets the registration period.
`protected int` | `getRegistrationType()` Gets the enum used to classify the type (responsibility) of registration.
`protected int` | `getRegistrationTypeFromString(java.lang.String regTypeStr)` Gets the enumerated int constant that corresponds to the string value used to classify the type (responsibility) of registration.
`java.lang.String` | `getRegistrationTypeString()` Gets the string constant that corresponds to the enumerated valued used to classify the type (responsibility) of registration.
`protected java.lang.String` | `getRegistrationTypeString(int regType)` Gets the string constant that corresponds to the enumerated valued used to classify the type (responsibility) of registration.
`java.lang.String` | `getRunningNodeIdentifier()` Gets the string used to identify a running node.
`java.lang.String` | `getRunningNodeName()` Gets the name of the running node.
`java.lang.String` | `getRunningServerIdentifier()` Gets the string used to identify a running server.
`void` | `initialize(java.lang.String agentId, java.lang.String nodeId, java.lang.String serverId, java.lang.String nodeName, long regPeriod, boolean nonCompete)` Initializes a ClusteringToken.
`protected static void` | `initializeDefaultDeclarations()` Initialize the set of tables that define the default agent ID declarations.
`boolean` | `isRegistered()` Gets indication of whether this token is registered, from the perspective of the caller
`boolean` | `isTokenNonCompeting()` Returns indication as to whether the token is non-competing.
`protected boolean` | `performTokenUpdates(LibrarySession session, ApplicationToken appToken)` Perform any appropriate updates to the ApplicationToken.
`void` | `refreshRegistrationType(LibrarySession session)` Refreshes the registration type (responsibility) for this token.
`void` | `releaseRegistration(LibrarySession session)` Releases the registration for the token.
`protected void` | `releaseToken(LibrarySession session, java.lang.String agentId, ApplicationToken token)` Releases the token.
`protected void` | `setClusteringStatus(java.lang.String status)` Sets the clustering status.
`void` | `setRegistrationPeriod(long regPeriod)` Sets the registration period.
`protected boolean` | `updateTokenClearNodeRegistration(LibrarySession session, ApplicationToken token, java.lang.String nodeId, long expirePeriod)` Updates the specified node token, in an attempt to expire it.
`protected boolean` | `updateTokenClearRegistration(LibrarySession session, java.lang.String agentId, ApplicationToken appToken, java.lang.String nodeId)` Updates the specified ApplicationToken, in an attempt to clear its registraton.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SERVER_REGISTRATION_TYPE_UNKNOWN

    public static final int SERVER_REGISTRATION_TYPE_UNKNOWN

  Description copied from class: `ClusteringToken`
  The Registration type value used to indicate no registration.

  See Also:
    Constant Field Values

### SERVER_REGISTRATION_TYPE_NONE

    public static final int SERVER_REGISTRATION_TYPE_NONE

  Description copied from class: `ClusteringToken`
  The Registration type value used to indicate no registration.

  See Also:
    Constant Field Values

### SERVER_REGISTRATION_TYPE_BACKUP

    public static final int SERVER_REGISTRATION_TYPE_BACKUP

  Description copied from class: `ClusteringToken`
  The Registration type value used classify Backup server registrations.

  See Also:
    Constant Field Values

### SERVER_REGISTRATION_TYPE_SECONDARY

    public static final int SERVER_REGISTRATION_TYPE_SECONDARY

  Description copied from class: `ClusteringToken`
  The Registration type value used classify Secondary server registrations.

  See Also:
    Constant Field Values

### SERVER_REGISTRATION_TYPE_PRIMARY

    public static final int SERVER_REGISTRATION_TYPE_PRIMARY

  Description copied from class: `ClusteringToken`
  The Registration type value used classify Primary server registrations.

  See Also:
    Constant Field Values

### POSITIONAL_NODE_ALIAS_PREFIX

    public static final java.lang.String POSITIONAL_NODE_ALIAS_PREFIX

  Description copied from class: `ClusteringToken`
  Prefix used to identify posiitonal node alias names.

  Currently has the value "$$NODE".

  See Also:
    Constant Field Values

### REGISTRATION_TYPE_STRINGS

    public static final java.lang.String[] REGISTRATION_TYPE_STRINGS

  Description copied from class: `ClusteringToken`
  String representations of the enumerated registration types.

Constructor Detail

### ClusteringToken

    public ClusteringToken()

  Constructs a ClusteringToken.

Method Detail

### initialize

    public void initialize(java.lang.String agentId,
                           java.lang.String nodeId,
                           java.lang.String serverId,
                           java.lang.String nodeName,
                           long regPeriod,
                           boolean nonCompete)

  Description copied from class: `ClusteringToken`
  Initializes a ClusteringToken.

  Parameters:
    `agentId` - the agent identifier
    `nodeId` - the node identifier
    `serverId` - the running server identifier
    `nodeName` - the node name
    `regPeriod` - the registration period
    `nonCompete` - whether the token is non-competing

### isRegistered

    public boolean isRegistered()

  Description copied from class: `ClusteringToken`
  Gets indication of whether this token is registered, from the perspective of the caller

  Returns:
    true if registered; false otherwise

### getAgentIdentifier

    public java.lang.String getAgentIdentifier()

  Description copied from class: `ClusteringToken`
  Gets the agent identifier.

  Returns:
    the agent identifier

### getRunningNodeIdentifier

    public java.lang.String getRunningNodeIdentifier()

  Description copied from class: `ClusteringToken`
  Gets the string used to identify a running node.

  Is a composite of the running node name and the service ID, e.g. "stadc35_node1:9461928".

  Returns:
    the running node identifier

### getRunningServerIdentifier

    public java.lang.String getRunningServerIdentifier()

  Description copied from class: `ClusteringToken`
  Gets the string used to identify a running server.

  Is a composite of the agent identifier and the running node identifer, e.g. "IFS.AGENT.INTERNAL.CleanupAgent:stadc35_node1:9461928".

  Returns:
    the running server identifier

### getRunningNodeName

    public java.lang.String getRunningNodeName()

  Description copied from class: `ClusteringToken`
  Gets the name of the running node.

  Returns:
    the running node name

### getEffectiveNodeList

    public java.lang.String getEffectiveNodeList()

  Description copied from class: `ClusteringToken`
  Gets the effective node list, used to calculate the registration type (responsibility).

  Returns:
    the effective node list

### getRegistrationTypeString

    public java.lang.String getRegistrationTypeString()

  Description copied from class: `ClusteringToken`
  Gets the string constant that corresponds to the enumerated valued used to classify the type (responsibility) of registration.

  Returns:
    the Registration type (responsibility)

### getRegistrationTypeString

    protected java.lang.String getRegistrationTypeString(int regType)

  Description copied from class: `ClusteringToken`
  Gets the string constant that corresponds to the enumerated valued used to classify the type (responsibility) of registration.

  Parameters:
    `regType` - the Registration type
  Returns:
    the Registration type string

### getRegistrationTypeFromString

    protected int getRegistrationTypeFromString(java.lang.String regTypeStr)

  Description copied from class: `ClusteringToken`
  Gets the enumerated int constant that corresponds to the string value used to classify the type (responsibility) of registration.

  Parameters:
    `regTypeStr` - the Registration type string
  Returns:
    the Registration type

### getRegistrationType

    protected int getRegistrationType()

  Description copied from class: `ClusteringToken`
  Gets the enum used to classify the type (responsibility) of registration.

  Returns:
    the Registration type

### isTokenNonCompeting

    public boolean isTokenNonCompeting()

  Description copied from class: `ClusteringToken`
  Returns indication as to whether the token is non-competing.

  A non-competing token is one that always assumes a Primary registration type (responsibility), and always attempts to free the ApplicationToken upon unregistration.

  Returns:
    true if token is non-competing; false otherwise

### getRegistrationPeriod

    public long getRegistrationPeriod()

  Description copied from class: `ClusteringToken`
  Gets the registration period.

  Returns:
    the registration period

### getClusteringStatus

    public java.lang.String getClusteringStatus()

  Description copied from class: `ClusteringToken`
  Returns the clustering status, used to publish the status of this instance.

  Returns:
    the clustering status

### setRegistrationPeriod

    public void setRegistrationPeriod(long regPeriod)

  Description copied from class: `ClusteringToken`
  Sets the registration period.

  Parameters:
    `regPeriod` - the registration period

### setClusteringStatus

    protected void setClusteringStatus(java.lang.String status)

  Description copied from class: `ClusteringToken`
  Sets the clustering status.

  Parameters:
    `status` - the clustering status

### refreshRegistrationType

    public void refreshRegistrationType(LibrarySession session)
                                 throws IfsException

  Description copied from class: `ClusteringToken`
  Refreshes the registration type (responsibility) for this token.

  Parameters:
    `session` - the session context
  Throws:
    `IfsException` - if the operation fails

### releaseRegistration

    public void releaseRegistration(LibrarySession session)
                             throws IfsException

  Description copied from class: `ClusteringToken`
  Releases the registration for the token.

  Parameters:
    `session` - the session context
  Throws:
    `IfsException` - if the operation fails

### releaseToken

    protected void releaseToken(LibrarySession session,
                                java.lang.String agentId,
                                ApplicationToken token)
                         throws IfsException

  Description copied from class: `ClusteringToken`
  Releases the token.

  Parameters:
    `session` - the session context
    `agentId` - the agent ID of the token
    `token` - the token to release
  Throws:
    `IfsException` - if the operation fails

### checkRegistration

    public boolean checkRegistration(LibrarySession session,
                                     java.lang.Long appTokenId)
                              throws IfsException

  Description copied from class: `ClusteringToken`
  Checks the registration for this Server.

  The tokenId argument specified indicates whether there is a specific token context for the check registration request, which can occur is the re-check is triggered by an event. If the tokenId specified is null, the re-check should be performed without exception.

  Parameters:
    `session` - the session context
    `appTokenId` - the token Id context; null indicates that the registration check should unequivocally
  Returns:
    true if the server instance is registered; false otherwise
  Throws:
    `IfsException` - if the operation fails

### challengeNodes

    protected void challengeNodes(LibrarySession session,
                                  ApplicationToken appToken)
                           throws IfsException

  Description copied from class: `ClusteringToken`
  Challenge one of the nodes holding either registree or standby.

  Parameters:
    `session` - the session context
    `appToken` - the ApplicationToken
  Throws:
    `IfsException` - if the operation fails

### challengeNode

    protected boolean challengeNode(LibrarySession session,
                                    java.lang.String nodeId)
                             throws IfsException

  Description copied from class: `ClusteringToken`
  Challenge the node token for the specified Node ID.

  Parameters:
    `session` - the session context
    `nodeId` - the node ID to be challenged
  Returns:
    true if the node token was released; false otherwise
  Throws:
    `IfsException` - if the operation fails

### performTokenUpdates

    protected boolean performTokenUpdates(LibrarySession session,
                                          ApplicationToken appToken)
                                   throws IfsException

  Description copied from class: `ClusteringToken`
  Perform any appropriate updates to the ApplicationToken.

  Parameters:
    `session` - the session context
    `appToken` - the ApplicationToken
  Returns:
    indication as to whether this ClusteringToken is the registree
  Throws:
    `IfsException` - if the operation fails

### updateTokenClearRegistration

    protected boolean updateTokenClearRegistration(LibrarySession session,
                                                   java.lang.String agentId,
                                                   ApplicationToken appToken,
                                                   java.lang.String nodeId)
                                            throws IfsException

  Description copied from class: `ClusteringToken`
  Updates the specified ApplicationToken, in an attempt to clear its registraton.

  Parameters:
    `session` - the session context
    `agentId` - the agent ID of the token
    `appToken` - the ApplicationToken to modify
    `nodeId` - the node ID performing this operation
  Returns:
    true if the token was updated; false otherwise
  Throws:
    `IfsException` - if the operation fails

### updateTokenClearNodeRegistration

    protected boolean updateTokenClearNodeRegistration(LibrarySession session,
                                                       ApplicationToken token,
                                                       java.lang.String nodeId,
                                                       long expirePeriod)
                                                throws IfsException

  Description copied from class: `ClusteringToken`
  Updates the specified node token, in an attempt to expire it.

  Parameters:
    `session` - the session context
    `token` - the node token to modify
    `nodeId` - the expected node ID
    `expirePeriod` - the expiration period
  Returns:
    true if the node token was updated; false otherwise
  Throws:
    `IfsException` - if the operation fails

### initializeDefaultDeclarations

    protected static void initializeDefaultDeclarations()

  Description copied from class: `ClusteringToken`
  Initialize the set of tables that define the default agent ID declarations.

### getPositionInStringArray

    protected int getPositionInStringArray(java.lang.String value,
                                           java.lang.String[] array,
                                           boolean ignoreCase)

  Description copied from class: `ClusteringToken`
  Return position of the specified string in the array, or -1 if it is not in the array.

  The specified value must not be null. Returns the position of the first match.

  Parameters:
    `value` - the string value to check for
    `array` - the string array
    `ignoreCase` - whether to ignore case while checking
  Returns:
    the position within the array, or -1 if no match

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD