Class TdbGridClusterMember


  • public class TdbGridClusterMember
    extends java.lang.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​(java.lang.String name)
      Constructor, creates a replica set member, i.e. a collection of physical databases that all exhibit the same content.
      TdbGridClusterMember​(java.lang.String host, java.lang.String name)
      Constructor, creates a physical member, i.e. a database residing on a host
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Overrides the default behavior to define equality only if type, name and (if applicable) host name are identical
      java.lang.String getHost()
      Retrieve the name of the host providing the physical database member
      java.lang.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​(java.lang.String name)
      Establish the name or IP address of the host providing the physical database member
      void setName​(java.lang.String name)
      Establish the name of the cluster member
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TdbGridClusterMember

        public TdbGridClusterMember​(java.lang.String host,
                                    java.lang.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​(java.lang.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 Detail

      • 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 java.lang.String getName()
        Retrieve the name of the cluster member
        Returns:
        Cluster member name
      • setName

        public void setName​(java.lang.String name)
        Establish the name of the cluster member
        Parameters:
        name - Cluster member name
      • getHost

        public java.lang.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​(java.lang.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​(java.lang.Object obj)
        Overrides the default behavior to define equality only if type, name and (if applicable) host name are identical
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - Object to test
        Returns:
        true / false