Package com.tietoenator.trip.jxp.grid

# Class TdbGridClusterMember

java.lang.Object
com.tietoenator.trip.jxp.grid.TdbGridClusterMember

public class TdbGridClusterMember extends Object
Container class for items within a TRIPgrid cluster.
Cluster members are either databases, i.e. physical entities served by physical hosts, or replica sets, which are copies of the same database served by 2 or more physical hosts. The grid router resolves replica members to a particular physical database on a particular host for each query placed against the cluster.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TdbGridClusterMember(TdbGridClusterMember src)`
  Copy constructor
  `TdbGridClusterMember(String name)`
  Constructor, creates a replica set member, i.e. a collection of physical databases that all exhibit the same content.
  `TdbGridClusterMember(String host, String name)`
  Constructor, creates a physical member, i.e. a database residing on a host

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  Overrides the default behavior to define equality only if type, name and (if applicable) host name are identical
  `String`
  `getHost()`
  Retrieve the name of the host providing the physical database member
  `String`
  `getName()`
  Retrieve the name of the cluster member
  `boolean`
  `isPhysical()`
  Check if this member is a physical member, i.e. a database published from a host
  `boolean`
  `isReplicaSet()`
  Check if this member is a replica set
  `void`
  `setHost(String name)`
  Establish the name or IP address of the host providing the physical database member
  `void`
  `setName(String name)`
  Establish the name of the cluster member

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TdbGridClusterMember

    public TdbGridClusterMember(String host, String name)
    Constructor, creates a physical member, i.e. a database residing on a host
    Parameters:
      `host` - Name or IP address of host
      `name` - Name of database, thesaurus or cluster

  - ### TdbGridClusterMember

    public TdbGridClusterMember(String name)
    Constructor, creates a replica set member, i.e. a collection of physical databases that all exhibit the same content.
    Parameters:
      `name` - Name of replica set

  - ### TdbGridClusterMember

    public TdbGridClusterMember(TdbGridClusterMember src)
    Copy constructor
    Parameters:
      `src` - Source to be copied

- ## Method Details

  - ### isPhysical

    public boolean isPhysical()
    Check if this member is a physical member, i.e. a database published from a host
    Returns:
      true / false

  - ### isReplicaSet

    public boolean isReplicaSet()
    Check if this member is a replica set
    Returns:
      true / false

  - ### getName

    public String getName()
    Retrieve the name of the cluster member
    Returns:
      Cluster member name

  - ### setName

    public void setName(String name)
    Establish the name of the cluster member
    Parameters:
      `name` - Cluster member name

  - ### getHost

    public String getHost()
    Retrieve the name of the host providing the physical database member
    Returns:
      Host name if the member is physical, empty string otherwise

  - ### setHost

    public void setHost(String name)
    Establish the name or IP address of the host providing the physical database member
    Parameters:
      `name` - Host name or IP address; this is ignored if the member is not physical

  - ### equals

    public boolean equals(Object obj)
    Overrides the default behavior to define equality only if type, name and (if applicable) host name are identical
    Overrides:
      `equals` in class `Object`
    Parameters:
      `obj` - Object to test
    Returns:
      true / false