*** This class provides Binary Compatibility only, not Source Compatibility ***

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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Flag for failover clusters.
    static final int
    Flag for load-balancing clusters.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Cluster(Server[] serverArray)
    Construct a cluster of IOM servers.
  • Method Summary

    Modifier and Type
    Method
    Description
    Object
     
    protected abstract int
     
    boolean
    equals(Object that)
     
    String
    Get the class ID of the servers in this cluster.
    abstract int
    Get the cluster type.
    String
    Get the domain of the servers in this cluster.
    static Cluster
    getInstance(Server[] servers, int clusterType)
    Construct and return a cluster of IOM servers.
    int
    Get the maximum number of clients this cluster can support at one time.
    Get the array of servers that have been added to the cluster.
    int
     
    void
    setServerArray(Server[] serverArray)
    Set the array of servers in the cluster.
    String
     

    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_BALANCING
      Flag 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_FAILOVER
      Flag 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

      protected Cluster(Server[] serverArray)
      Construct a cluster of IOM servers.
      Parameters:
      serverArray - the servers to add to the cluster.
  • Method Details

    • getInstance

      public static Cluster getInstance(Server[] servers, int clusterType)
      Construct and return a cluster of IOM servers.
      Parameters:
      servers - the servers to add to the cluster.
      clusterType - the cluster type
      See Also:
    • setServerArray

      public void setServerArray(Server[] serverArray)
      Set the array of servers in the cluster.
      Parameters:
      serverArray - the array of servers to add to the cluster
    • getServerArray

      public Server[] 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:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • computeMaxClients

      protected abstract int computeMaxClients()