public class ClusteringUtilities extends Object
Modifier and Type | Field and Description |
---|---|
static String[] |
DEFAULT_DECLARED_AGENT_IDENTIFIERS
Deprecated.
Default value for the clustering property that contains the set of
disabled agent identifiers.
|
static String[] |
DEFAULT_DECLARED_AGENT_NODES
Deprecated.
Default value for the clustering property that contains the set of
declared nodes that will service agents.
|
static String[] |
DEFAULT_DISABLED_AGENT_IDENTIFIERS
Deprecated.
Default value for the clustering property that contains the set of
disabled agent identifiers.
|
static boolean |
DEFAULT_EVENT_NOTIFICATION_ENABLED
Deprecated.
Default value for the clustering property that indicates whether
automatic event notification is enabled.
|
static String |
DEFAULT_REGISTRATION_PERIOD
Deprecated.
Default value for the clustering property that holds the
period for refreshing token registration.
|
static long |
DEFAULT_REGISTRATION_PERIOD_VALUE
Deprecated.
Default numeric value for the default registration period,
in milliseconds.
|
static String |
NODE_REGISTRATION_TYPE_ACTIVE
Deprecated.
The Registration type value used classify active node registrations.
|
static String |
NODE_REGISTRATION_TYPE_EXPIRED
Deprecated.
The Registration type value used classify expired node registrations.
|
static String |
PROPERTY_DECLARED_AGENT_IDENTIFIERS
Deprecated.
The name of the clustering property that contains the set of
declared agent identifiers.
|
static String |
PROPERTY_DECLARED_AGENT_NODES
Deprecated.
The name of the clustering property that contains the set of
declared nodes that will service agents.
|
static String |
PROPERTY_DISABLED_AGENT_IDENTIFIERS
Deprecated.
The name of the clustering property that contains the set of
disabled agent identifiers.
|
static String |
PROPERTY_EVENT_NOTIFICATION_ENABLED
Deprecated.
The name of the clustering property that indicates whether
automatic event notification is enabled.
|
static String |
PROPERTY_REGISTRATION_PERIOD
Deprecated.
The name of the clustering property that holds the time
period for re-checking a server's registration state.
|
static String |
SYSTEM_AGENT_TOKEN_CREATED
Deprecated.
The event type key for the "Agent token created"
SYSTEM operation.
|
static String |
SYSTEM_AGENT_TOKEN_FREED
Deprecated.
The event type key for the "Agent token freed"
SYSTEM operation.
|
static String |
SYSTEM_AGENT_TOKEN_REGISTREE_ADDED
Deprecated.
The event type key for the "Agent token registree added"
SYSTEM operation.
|
static String |
SYSTEM_AGENT_TOKEN_REGISTREE_EXPIRED
Deprecated.
The event type key for the "Agent token registree expired"
SYSTEM operation.
|
static String |
SYSTEM_AGENT_TOKEN_REGISTREE_REMOVED
Deprecated.
The event type key for the "Agent token registree removed"
SYSTEM operation.
|
static String |
SYSTEM_AGENT_TOKEN_STANDBY_ADDED
Deprecated.
The event type key for the "Agent token standby added"
SYSTEM operation.
|
static String |
SYSTEM_AGENT_TOKEN_STANDBY_EXPIRED
Deprecated.
The event type key for the "Agent token standby expired"
SYSTEM operation.
|
static String |
SYSTEM_AGENT_TOKEN_STANDBY_REMOVED
Deprecated.
The event type key for the "Agent token standby removed"
SYSTEM operation.
|
static String |
SYSTEM_NODE_TOKEN_CREATED
Deprecated.
The event type key for the "Node token created"
SYSTEM operation.
|
static String |
SYSTEM_NODE_TOKEN_EXPIRED
Deprecated.
The event type key for the "Node token expired"
SYSTEM operation.
|
static String |
SYSTEM_NOTIFIED
Deprecated.
The event type key for the "SYSTEM notified"
operation.
|
static String |
SYSTEM_UPGRADED
Deprecated.
The event type key for the "SYSTEM upgraded"
operation.
|
static String |
TOKEN_NAME_AGENT_PREFIX
Deprecated.
The prefix to use for TokenValues of tokens used for agent registration.
|
static String |
TOKEN_NAME_HANDLER_PREFIX
Deprecated.
The prefix to use for TokenValues of tokens used for handler registration.
|
static String |
TOKEN_NAME_INTERNAL_AGENT_PREFIX
Deprecated.
The prefix to use for TokenValues of tokens used for internal
(Oracle-supplied) agent registration.
|
static String |
TOKEN_NAME_NODE_PREFIX
Deprecated.
The prefix to use for TokenValues of tokens used for node registration.
|
Constructor and Description |
---|
ClusteringUtilities()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static void |
addDeclaredAgentNode(LibrarySession session,
String nodeName)
Deprecated.
Adds the specified node to the list of declared agent nodes.
|
protected static void |
addNodeTokenInfo(List list,
ApplicationToken token)
Deprecated.
Adds info for a node token to the specified list, including
the servers associated with it also.
|
static ApplicationToken |
findOrCreateToken(LibrarySession session,
String tokenValue,
String tokenInfo,
String tokenDesc)
Deprecated.
Finds or creates the token matching the specified Token value.
|
static ApplicationToken |
findToken(LibrarySession session,
String tokenValue)
Deprecated.
Finds the token matching the specified Token value.
|
static List |
getAllServerTokenInfoByNode(LibrarySession session)
Deprecated.
Selects a list of strings that reflects the set of all server tokens,
grouped by the registered node.
|
protected static boolean |
getBooleanClusteringProperty(LibrarySession session,
String key,
boolean defVal)
Deprecated.
Gets the value of a boolean clustering property.
|
static AttributeValue |
getClusteringProperty(LibrarySession session,
String key)
Deprecated.
Gets a clustering property by key.
|
static PropertyBundle |
getClusteringPropertyBundle(LibrarySession session)
Deprecated.
Gets the PropertyBundle used to hold the clustering properties.
|
static String[] |
getDeclaredAgentIdentifiers(LibrarySession session)
Deprecated.
Gets the set of declared agent identifiers.
|
static String[] |
getDeclaredAgentNodes(LibrarySession session)
Deprecated.
Gets the set of declared nodes that will service agents.
|
protected static PublicObject |
getDefaultDomain(LibrarySession session)
Deprecated.
Gets the default domain for the instance.
|
static String[] |
getDisabledAgentIdentifiers(LibrarySession session)
Deprecated.
Gets the set of disabled agent identifiers.
|
protected static int |
getIntegerClusteringProperty(LibrarySession session,
String key,
int defVal)
Deprecated.
Gets the value of a integer clustering property.
|
protected static long |
getLongClusteringProperty(LibrarySession session,
String key,
long defVal)
Deprecated.
Gets the value of a Long clustering property.
|
protected static String |
getNodeTokenString(ApplicationToken token,
String indent)
Deprecated.
Gets a string that reflects the specified node token.
|
protected static String |
getPaddingString(String tokenValue,
int paddedLength)
Deprecated.
Returns a string that has blanks padded to the end of the specified string
such the result is the specified length.
|
static String |
getRegistrationPeriod(LibrarySession session)
Deprecated.
Gets the period that servers should recheck their registrations.
|
static long |
getRegistrationPeriodValue(LibrarySession session)
Deprecated.
Gets the numeric value of the registration period, in
milliseconds.
|
protected static String |
getServerTokenString(ApplicationToken token,
String indent)
Deprecated.
Gets a string that reflects the specified server token.
|
protected static String[] |
getStringArrayClusteringProperty(LibrarySession session,
String key,
String[] defVal)
Deprecated.
Gets the value of a String[] clustering property.
|
protected static String |
getStringClusteringProperty(LibrarySession session,
String key,
String defVal)
Deprecated.
Gets the value of a String clustering property.
|
static void |
initializeClusteringPropertyBundle(LibrarySession session)
Deprecated.
Initializes the Clustering PropertyBundle with the default set of the
clustering properties and their default values.
|
static boolean |
isAgentIdentifierDisabled(LibrarySession session,
String agentId)
Deprecated.
Checks the specified agent ID to see if it is on the disabled list.
|
static boolean |
isDeclaredAgentNode(LibrarySession session,
String nodeName)
Deprecated.
Returns indication as to whether the specified node is in the
current list of declared nodes.
|
static boolean |
isEventNotificationEnabled(LibrarySession session)
Deprecated.
Gets indication as to whether event notifications
are enabled.
|
static void |
postAgentTokenFreed(LibrarySession session,
String agentId,
String execNodeId)
Deprecated.
Posts an audit event reflecting an agent token being freed.
|
static void |
postAgentTokenHolderAdded(LibrarySession session,
String agentId,
String nodeId,
String regTypeStr,
boolean isRegistree)
Deprecated.
Posts an audit event reflecting an agent token having its
registree or standby set.
|
static void |
postAgentTokenHolderExpired(LibrarySession session,
String agentId,
String nodeId,
String execNodeId,
String regTypeStr,
boolean isRegistree)
Deprecated.
Posts an audit event reflecting an agent token having its
registree or standby expired, due to its token being expired.
|
static void |
postAgentTokenHolderRemoved(LibrarySession session,
String agentId,
String nodeId,
String regTypeStr,
boolean isRegistree)
Deprecated.
Posts an audit event reflecting an agent token having its
registree or standby cleared.
|
static void |
postClusteringChangeNotification(LibrarySession session)
Deprecated.
Posts a notification of a clustering change to all agents.
|
static void |
postClusteringChangeNotification(LibrarySession session,
ApplicationToken appToken)
Deprecated.
Posts a notification of a clustering change to all agents.
|
static void |
postNodeTokenExpired(LibrarySession session,
String tokenValue,
String tokenInfo,
String execNodeId)
Deprecated.
Posts an audit event reflecting a node token expiration.
|
static void |
postTokenCreation(LibrarySession session,
String tokenValue,
String tokenInfo)
Deprecated.
Posts an audit event reflecting a token creation.
|
static ApplicationToken[] |
selectAllNodeTokens(LibrarySession session)
Deprecated.
Selects all ApplicationToken instances that reflect a node
registration.
|
static ApplicationToken[] |
selectAllServerTokens(LibrarySession session)
Deprecated.
Selects all ApplicationToken instances that reflect server
(agent or handler) registrations.
|
protected static ApplicationToken[] |
selectAllTokensByPattern(LibrarySession session,
String stmtKey,
String searchQual,
AttributeValue[] bindValues)
Deprecated.
Selects all ApplicationToken instances that reflect a server
registration.
|
static ApplicationToken[] |
selectServerTokensByNode(LibrarySession session,
String info)
Deprecated.
Selects all ApplicationToken instances that reflect a server
registration and match a specified TokenInfo value, which reflects
the node registration.
|
static void |
setClusteringProperty(LibrarySession session,
String key,
AttributeValue value)
Deprecated.
Sets the value of a clustering property.
|
static void |
setDeclaredAgentIdentifiers(LibrarySession session,
String[] value)
Deprecated.
Sets the set of declared agent identifiers.
|
static void |
setDeclaredAgentNodes(LibrarySession session,
String[] value)
Deprecated.
Sets the set of declared nodes that will service agents.
|
static void |
setDisabledAgentIdentifiers(LibrarySession session,
String[] value)
Deprecated.
Sets the set of disabled agent identifiers.
|
static void |
setEventNotificationEnabled(LibrarySession session,
Boolean value)
Deprecated.
Sets indication as to whether event notifications
are enabled.
|
static void |
setRegistrationPeriod(LibrarySession session,
String value)
Deprecated.
Sets the period that servers should recheck their registrations.
|
public static final String TOKEN_NAME_NODE_PREFIX
Currently has the value "IFS.NODE.".
public static final String TOKEN_NAME_AGENT_PREFIX
Currently has the value "IFS.AGENT.".
public static final String TOKEN_NAME_INTERNAL_AGENT_PREFIX
Currently has the value "IFS.AGENT.INTERNAL.".
public static final String TOKEN_NAME_HANDLER_PREFIX
Currently has the value "IFS.HANDLER.".
public static final String NODE_REGISTRATION_TYPE_ACTIVE
Currently has the value "Active".
public static final String NODE_REGISTRATION_TYPE_EXPIRED
Currently has the value "Expired".
public static final String PROPERTY_DECLARED_AGENT_NODES
Datatype of property value: String[].
public static final String PROPERTY_DECLARED_AGENT_IDENTIFIERS
Datatype of property value: String[].
public static final String PROPERTY_DISABLED_AGENT_IDENTIFIERS
Datatype of property value: String[].
public static final String PROPERTY_REGISTRATION_PERIOD
Datatype of property value: String.
public static final String PROPERTY_EVENT_NOTIFICATION_ENABLED
Datatype of property value: Boolean.
public static final String[] DEFAULT_DECLARED_AGENT_NODES
public static final String[] DEFAULT_DECLARED_AGENT_IDENTIFIERS
public static final String[] DEFAULT_DISABLED_AGENT_IDENTIFIERS
public static final String DEFAULT_REGISTRATION_PERIOD
public static final boolean DEFAULT_EVENT_NOTIFICATION_ENABLED
public static final long DEFAULT_REGISTRATION_PERIOD_VALUE
public static final String SYSTEM_UPGRADED
public static final String SYSTEM_NOTIFIED
public static final String SYSTEM_NODE_TOKEN_CREATED
public static final String SYSTEM_NODE_TOKEN_EXPIRED
public static final String SYSTEM_AGENT_TOKEN_CREATED
public static final String SYSTEM_AGENT_TOKEN_FREED
public static final String SYSTEM_AGENT_TOKEN_REGISTREE_ADDED
public static final String SYSTEM_AGENT_TOKEN_REGISTREE_REMOVED
public static final String SYSTEM_AGENT_TOKEN_REGISTREE_EXPIRED
public static final String SYSTEM_AGENT_TOKEN_STANDBY_ADDED
public static final String SYSTEM_AGENT_TOKEN_STANDBY_REMOVED
public static final String SYSTEM_AGENT_TOKEN_STANDBY_EXPIRED
public static PropertyBundle getClusteringPropertyBundle(LibrarySession session) throws IfsException
Can return null, which implies no properties are defined.
session
- the session contextIfsException
- if the operation failspublic static void initializeClusteringPropertyBundle(LibrarySession session) throws IfsException
session
- the session contextIfsException
- if the operation failspublic static String[] getDeclaredAgentNodes(LibrarySession session) throws IfsException
May return null, indicating that no nodes are declared. Any undeclared node will run with default responsibility (typically backup) for the agent idenitifiers.
session
- the session contextIfsException
- if the operation failspublic static boolean isDeclaredAgentNode(LibrarySession session, String nodeName) throws IfsException
A NullPointerException will occur if the specified node name is null.
session
- the session contextnodeName
- the node name to checkIfsException
- if the operation failspublic static String[] getDeclaredAgentIdentifiers(LibrarySession session) throws IfsException
May return null, indicating that no agent identifiers are declared.
Declared agent identifiers are ones that have explicit load balancing information declared related to their execution. Agent identifiers that are neither declared nor disabled are handled in the default manner.
session
- the session contextIfsException
- if the operation failspublic static String[] getDisabledAgentIdentifiers(LibrarySession session) throws IfsException
May return null, indicating that no agent identifiers are disabled.
Any agentattempting to register for an agent identifier listed in this property will be denied.
session
- the session contextIfsException
- if the operation failspublic static String getRegistrationPeriod(LibrarySession session) throws IfsException
The period is expressed as a string, e.g. "5M" for minutes. The period is used by servers to internally re-check their registration status at no less frequent than the period indicated.
session
- the session contextIfsException
- if the operation failspublic static long getRegistrationPeriodValue(LibrarySession session) throws IfsException
Converts the string returned from getRegistrationPeriod
to a time period, in milliseconds. Also performs validation and
range checking, returning default values if the input is invalid.
session
- the session contextIfsException
- if the operation failspublic static boolean isEventNotificationEnabled(LibrarySession session) throws IfsException
Event notifications are indicated by posting a CMSDK event
via ClusteringUtilities.postClusteringChangeNotification
.
These can be disabled manually, resulting in a strictly timer-based
model for handling load balancing operations.
session
- the session contextIfsException
- if the operation failspublic static boolean isAgentIdentifierDisabled(LibrarySession session, String agentId) throws IfsException
IfsException
- if the operation failspublic static void setDeclaredAgentNodes(LibrarySession session, String[] value) throws IfsException
session
- the session contextvalue
- the set of declared agent nodesIfsException
- if the operation failspublic static void addDeclaredAgentNode(LibrarySession session, String nodeName) throws IfsException
session
- the session contextnodeName
- the node name to add to list of declared agent nodesIfsException
- if the operation failspublic static void setDeclaredAgentIdentifiers(LibrarySession session, String[] value) throws IfsException
session
- the session contextvalue
- the set of declared agent identifiersIfsException
- if the operation failspublic static void setDisabledAgentIdentifiers(LibrarySession session, String[] value) throws IfsException
session
- the session contextvalue
- the set of disabled agent identifiersIfsException
- if the operation failspublic static void setRegistrationPeriod(LibrarySession session, String value) throws IfsException
session
- the session contextvalue
- the registration periodIfsException
- if the operation failspublic static void setEventNotificationEnabled(LibrarySession session, Boolean value) throws IfsException
session
- the session contextvalue
- the indication as to whether
event notifications are enabled.IfsException
- if the operation failspublic static AttributeValue getClusteringProperty(LibrarySession session, String key) throws IfsException
Returns null if the property is not defined.
session
- the session contextkey
- the property keyIfsException
- if the operation failspublic static ApplicationToken[] selectAllNodeTokens(LibrarySession session) throws IfsException
session
- the session contextIfsException
- if the operation failspublic static ApplicationToken[] selectAllServerTokens(LibrarySession session) throws IfsException
session
- the session contextIfsException
- if the operation failspublic static ApplicationToken[] selectServerTokensByNode(LibrarySession session, String info) throws IfsException
session
- the session contextinfo
- the token info value to search forIfsException
- if the operation failsprotected static ApplicationToken[] selectAllTokensByPattern(LibrarySession session, String stmtKey, String searchQual, AttributeValue[] bindValues) throws IfsException
session
- the session contextstmtKey
- the statement keysearchQual
- the search qualificationbindValues
- the bind valuesIfsException
- if the operation failspublic static ApplicationToken findToken(LibrarySession session, String tokenValue) throws IfsException
session
- the session contexttokenValue
- the token valueIfsException
- if the operation failspublic static ApplicationToken findOrCreateToken(LibrarySession session, String tokenValue, String tokenInfo, String tokenDesc) throws IfsException
session
- the session contexttokenValue
- the token valuetokenInfo
- the token info, used only if a new token is createdtokenDesc
- the token description, used only if a new token
is createdIfsException
- if the operation failspublic static List getAllServerTokenInfoByNode(LibrarySession session) throws IfsException
session
- the session contextIfsException
- if the operation failsprotected static void addNodeTokenInfo(List list, ApplicationToken token) throws IfsException
list
- the list to add the info totoken
- the tokenIfsException
- if the operation failsprotected static String getNodeTokenString(ApplicationToken token, String indent) throws IfsException
token
- the tokenindent
- the indentionIfsException
- if the operation failsprotected static String getServerTokenString(ApplicationToken token, String indent) throws IfsException
token
- the tokenindent
- the indentionIfsException
- if the operation failsprotected static String getPaddingString(String tokenValue, int paddedLength)
tokenValue
- the tokenpaddedLength
- the size to pad topublic static void postTokenCreation(LibrarySession session, String tokenValue, String tokenInfo) throws IfsException
session
- the session contexttokenValue
- the token value (agent ID or node's token ID)tokenInfo
- the token info (node ID for node tokens)IfsException
- if the operation failspublic static void postNodeTokenExpired(LibrarySession session, String tokenValue, String tokenInfo, String execNodeId) throws IfsException
session
- the session contexttokenValue
- the node's token IDtokenInfo
- the node ID for the node tokenexecNodeId
- the node ID executing the operationIfsException
- if the operation failspublic static void postAgentTokenFreed(LibrarySession session, String agentId, String execNodeId) throws IfsException
session
- the session contextagentId
- the agent IDexecNodeId
- the node ID executing the operationIfsException
- if the operation failspublic static void postAgentTokenHolderAdded(LibrarySession session, String agentId, String nodeId, String regTypeStr, boolean isRegistree) throws IfsException
session
- the session contextagentId
- the agent IDnodeId
- the node ID being addedregTypeStr
- the registration typeisRegistree
- true if for the registree; false if for the standbyIfsException
- if the operation failspublic static void postAgentTokenHolderRemoved(LibrarySession session, String agentId, String nodeId, String regTypeStr, boolean isRegistree) throws IfsException
session
- the session contextagentId
- the agent IDnodeId
- the node ID being addedregTypeStr
- the registration typeisRegistree
- true if for the registree; false if for the standbyIfsException
- if the operation failspublic static void postAgentTokenHolderExpired(LibrarySession session, String agentId, String nodeId, String execNodeId, String regTypeStr, boolean isRegistree) throws IfsException
session
- the session contextagentId
- the agent IDnodeId
- the node ID being addedexecNodeId
- the node ID executing the operationregTypeStr
- the registration typeisRegistree
- true if for the registree; false if for the standbyIfsException
- if the operation failsprotected static PublicObject getDefaultDomain(LibrarySession session) throws IfsException
This can return null if no Domains exist in the instance.
session
- the current sessionIfsException
- if the operation failspublic static void postClusteringChangeNotification(LibrarySession session) throws IfsException
session
- the session contextIfsException
- if the operation failspublic static void postClusteringChangeNotification(LibrarySession session, ApplicationToken appToken) throws IfsException
session
- the session contextappToken
- the ApplicationToken affected,
or null if notification applies to all tokensIfsException
- if the operation failsprotected static long getLongClusteringProperty(LibrarySession session, String key, long defVal) throws IfsException
session
- the session contextkey
- the clustering property keydefVal
- the default value to useIfsException
- if the operation failsprotected static int getIntegerClusteringProperty(LibrarySession session, String key, int defVal) throws IfsException
session
- the session contextkey
- the clustering property keydefVal
- the default value to useIfsException
- if the operation failsprotected static boolean getBooleanClusteringProperty(LibrarySession session, String key, boolean defVal) throws IfsException
session
- the session contextkey
- the clustering property keydefVal
- the default value to useIfsException
- if the operation failsprotected static String getStringClusteringProperty(LibrarySession session, String key, String defVal) throws IfsException
session
- the session contextkey
- the clustering property keydefVal
- the default value to useIfsException
- if the operation failsprotected static String[] getStringArrayClusteringProperty(LibrarySession session, String key, String[] defVal) throws IfsException
session
- the session contextkey
- the clustering property keydefVal
- the default value to useIfsException
- if the operation failspublic static void setClusteringProperty(LibrarySession session, String key, AttributeValue value) throws IfsException
session
- the session contextkey
- the clustering property keyvalue
- the value to useIfsException
- if the operation failsCopyright © 2023. All rights reserved.