com.esri.arcgis.server
Class ServerCluster2

java.lang.Object
  extended by com.esri.arcgis.server.ServerCluster2
All Implemented Interfaces:
Serializable

Deprecated.

@Deprecated
public class ServerCluster2
extends Object
implements Serializable

ServerCluster is deprecated as of 10.0, Use ServerCluster, ServerCluster allows caching SOM connections to improve performance. Use this class to get a ServerConnection object or IServerObjectManager interface to a SOM machine based on the clustering configuration. You can choose between various types defined in ServerClusterType class. This class will attempt to give you a connection to SOM from the input list of SOM machines. This class is thread safe and does not block other threads for long periods of time which could be caused due to communication error.

See Also:
Serialized Form

Constructor Summary
ServerCluster2(Collection soms, ServerClusterType serverClusterType)
          Deprecated. Constructor that takes in a list of machine names and the clustering algorithm.
ServerCluster2(Collection soms, ServerClusterType serverClusterType, String domain, String username, String password)
          Deprecated. Constructor that takes in a list of machine names, the clustering algorithm and user credentials to use while attempting to connect to a SOM.
 
Method Summary
 void addSOM(String som)
          Deprecated. Add SOM to list
 int getReconnectTimeInMins()
          Deprecated. Function to get the time value in mins after which time this class will attempt to reconnect to a bad SOM.
 int getServerClusterSize()
          Deprecated. Returns the cluster size.
 ServerClusterType getServerClusterType()
          Deprecated. Return the ServerClusterType configured for this class.
 ServerConnection getServerConnection()
          Deprecated. Method that returns a connection to the SOM machine based on the ServerClusterType that has been configured on this class.
 String getUserDomain()
          Deprecated. Return the user domain that is used to connect to a SOM.
 String getUserName()
          Deprecated. Return the username that is used to connect to a SOM.
 String getUserPassword()
          Deprecated. Return the user password that is used to connect to a SOM.
 boolean hasServer()
          Deprecated. Returns true if there is atleast 1 SOM in the list.
 String peek()
          Deprecated. This method returns the name of the host to which this class will attempt to connect next (for any thread) based on the configured clustering algorithm without actually making a connection.
 void removeSOM(String som)
          Deprecated. Remove a SOM from the list
 void setConfigurationToCheck(String serverObjectName, String serverObjectType)
          Deprecated. Method to set configuration information to check when connected to SOMs.
 void setCredentials(String domain, String username, String password)
          Deprecated. Set the credentials to use while connecting to the SOM
 void setReconnectTimeInMins(int timeInMins)
          Deprecated. Function to set a time value in mins after which time this class will attempt to reconnect to a bad SOM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerCluster2

public ServerCluster2(Collection soms,
                      ServerClusterType serverClusterType)
Deprecated. 
Constructor that takes in a list of machine names and the clustering algorithm.

Parameters:
Collection - - list of SOM machine names
ServerClusterType - - clustering algorithm

ServerCluster2

public ServerCluster2(Collection soms,
                      ServerClusterType serverClusterType,
                      String domain,
                      String username,
                      String password)
Deprecated. 
Constructor that takes in a list of machine names, the clustering algorithm and user credentials to use while attempting to connect to a SOM.

Parameters:
soms - - list of SOM machines for clustering.
serverClusterType - - clustering algorithm.
domain - - String representing the domain of the user
username - - String representing the name of the user
password - - String representing the password of the user
Method Detail

setConfigurationToCheck

public void setConfigurationToCheck(String serverObjectName,
                                    String serverObjectType)
Deprecated. 
Method to set configuration information to check when connected to SOMs. While handing out connections to SOMs this class will test if the set configuration information is available with the SOM. If not, it will log an exception and search for the next SOM. If this information is not set, this class will not server for any configuration.

Parameters:
serverObjectName - - String representing the server object.
serverObjectType - - String representing the server object type.

setReconnectTimeInMins

public void setReconnectTimeInMins(int timeInMins)
Deprecated. 
Function to set a time value in mins after which time this class will attempt to reconnect to a bad SOM.


getReconnectTimeInMins

public int getReconnectTimeInMins()
Deprecated. 
Function to get the time value in mins after which time this class will attempt to reconnect to a bad SOM.

Returns:
int

getServerConnection

public ServerConnection getServerConnection()
                                     throws SOMNotAvailableException
Deprecated. 
Method that returns a connection to the SOM machine based on the ServerClusterType that has been configured on this class. If all the SOM machines in the cluster are down/cannot be reached this method will throw an exception.

Throws:
SOMNotAvailableException - - when there are no SOM machines to connect to.

peek

public String peek()
Deprecated. 
This method returns the name of the host to which this class will attempt to connect next (for any thread) based on the configured clustering algorithm without actually making a connection. However, the class does not guarantee that the next connection it will hand out will be to the same host that is returned by this method.

Returns:
String - name of the SOM machine to which it could attempt to connect next or returns null if no active SOM could be found.

addSOM

public void addSOM(String som)
            throws NullPointerException
Deprecated. 
Add SOM to list

Throws:
NullPointerException

removeSOM

public void removeSOM(String som)
               throws NullPointerException
Deprecated. 
Remove a SOM from the list

Throws:
NullPointerException

setCredentials

public void setCredentials(String domain,
                           String username,
                           String password)
Deprecated. 
Set the credentials to use while connecting to the SOM


getServerClusterType

public ServerClusterType getServerClusterType()
Deprecated. 
Return the ServerClusterType configured for this class.


getUserName

public String getUserName()
Deprecated. 
Return the username that is used to connect to a SOM.


getUserPassword

public String getUserPassword()
Deprecated. 
Return the user password that is used to connect to a SOM.


getUserDomain

public String getUserDomain()
Deprecated. 
Return the user domain that is used to connect to a SOM.


hasServer

public boolean hasServer()
Deprecated. 
Returns true if there is atleast 1 SOM in the list.


getServerClusterSize

public int getServerClusterSize()
Deprecated. 
Returns the cluster size.