*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.connection
Class Cluster
java.lang.Object
com.sas.services.connection.Cluster
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
FailoverCluster,LoadBalancingCluster
@SASScope("ALL")
@BinaryCompatibilityOnly
public abstract class Cluster
extends Object
implements Cloneable, Serializable
A base class representing a cluster of IOM servers.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFlag for failover clusters.static final intFlag for load-balancing clusters. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObjectclone()protected abstract intbooleanequals(Object that) StringGet the class ID of the servers in this cluster.abstract intGet the cluster type.StringGet the domain of the servers in this cluster.static ClustergetInstance(Server[] servers, int clusterType) Construct and return a cluster of IOM servers.intGet the maximum number of clients this cluster can support at one time.Server[]Get the array of servers that have been added to the cluster.inthashCode()voidsetServerArray(Server[] serverArray) Set the array of servers in the cluster.StringtoString()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
TYPE_LOAD_BALANCING
public static final int TYPE_LOAD_BALANCINGFlag for load-balancing clusters. A load-balancing cluster is implemented with a IOM Object Spawner that monitors the load of a set of redundant servers and directs requests for new connections to the least loaded server.- See Also:
-
TYPE_FAILOVER
public static final int TYPE_FAILOVERFlag for failover clusters. A failover cluster is a set of redundant servers. The connection factory will attempt to connect to one of them, and, if that server is not available it will try another server in the cluster. The factory will raise an exception only if none of the servers in the cluster are available at the time of a connection request.- See Also:
-
-
Constructor Details
-
Cluster
Construct a cluster of IOM servers.- Parameters:
serverArray- the servers to add to the cluster.
-
-
Method Details
-
getInstance
Construct and return a cluster of IOM servers.- Parameters:
servers- the servers to add to the cluster.clusterType- the cluster type- See Also:
-
setServerArray
Set the array of servers in the cluster.- Parameters:
serverArray- the array of servers to add to the cluster
-
getServerArray
Get the array of servers that have been added to the cluster.- Returns:
- the array of servers that have been added to the cluster
-
getClusterType
public abstract int getClusterType()Get the cluster type.- Returns:
- the cluster type
- See Also:
-
getClassID
public String getClassID()Get the class ID of the servers in this cluster. All servers in a cluster must have the same class ID.- Returns:
- the class ID of the servers in this cluster
-
getDomain
public String getDomain()Get the domain of the servers in this cluster. All servers in a cluster must have the same domain.- Returns:
- the domain of the servers in this cluster
-
getMaxClients
public int getMaxClients()Get the maximum number of clients this cluster can support at one time. If this is a load balancing cluster, then this value is the sum of maxClients for all servers in the cluster. If this is a fail over cluster, then this value is equal to the smallest value of maxClients for all servers in the cluster.- Returns:
- the maximum number of clients this cluster can support at one time
-
equals
public boolean equals(Object that) - Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Overrides:
hashCodein classObject
-
clone
public Object clone()- Overrides:
clonein classObject
-
toString
public String toString()- Overrides:
toStringin classObject
-
computeMaxClients
protected abstract int computeMaxClients()
-