Class TdbGridCluster

    • Constructor Detail

      • TdbGridCluster

        public TdbGridCluster​(TdbSession session)
                       throws TdbException
        Constructor, creates a blank container for a new cluster
        Parameters:
        session - Active session
        Throws:
        TdbException
      • TdbGridCluster

        public TdbGridCluster​(TdbSession session,
                              TdbControlObject ob)
                       throws TdbException
        Constructor, creates a container for referencing the defined cluster
        Parameters:
        session - Active session
        ob - Control object referencing the cluster
        Throws:
        TdbException
    • Method Detail

      • getName

        public java.lang.String getName()
        Retrieve the name of the cluster
        Returns:
        Cluster name
      • setName

        public void setName​(java.lang.String name)
        Set the name of the cluster
        Parameters:
        name - Name of cluster
      • getComment

        public java.lang.String getComment()
        Retrieve the description of the cluster
        Returns:
        Cluster description, if any
      • setComment

        public void setComment​(java.lang.String comment)
        Set the description of the cluster
        Parameters:
        comment - Cluster description, if any
      • members

        public java.util.List<TdbGridClusterMember> members()
        Retrieve the grid cluster's membership list
        Returns:
        Cluster membership list
      • iterator

        public java.util.Iterator<TdbGridClusterMember> iterator()
        Retrieve an iterator over the grid cluster's membership list
        Specified by:
        iterator in interface java.lang.Iterable<TdbGridClusterMember>
        Returns:
        Cluster membership list iterator
      • add

        public void add​(TdbGridClusterMember member)
        Add a cluster member to the cluster
        Parameters:
        member - The new member to add to the cluster
      • create

        public void create​(java.lang.String name,
                           java.lang.String comment)
                    throws TdbException
        Create a new grid cluster.

        This method causes network I/O.

        Parameters:
        name - Name of new cluster
        comment - Optional description for the new cluster
        Throws:
        TdbException
      • remove

        public void remove​(java.lang.String name)
                    throws TdbException
        Remove a named cluster from the grid.

        This method causes network I/O.

        Parameters:
        name - Name of the cluster to remove
        Throws:
        TdbException
      • remove

        public void remove()
                    throws TdbException
        Remove the current cluster from the grid.

        This method causes network I/O.

        Throws:
        TdbException
      • rename

        public void rename​(java.lang.String newname)
                    throws TdbException
        Rename an existing cluster.

        This method causes network I/O.

        Parameters:
        newname - The new name of the cluster
        Throws:
        TdbException
      • get

        public void get()
                 throws TdbException
        Refresh the contents of the cluster from the grid.

        This method causes network I/O.

        Throws:
        TdbException
      • put

        public void put()
                 throws TdbException
        Store the contents of the cluster to the grid.

        This method causes network I/O.

        Throws:
        TdbException
      • contains

        public boolean contains​(TdbGridClusterMember member)
        Check if the cluster already contains a given member.
        Parameters:
        member - The member to check against the existing membership list
        Returns:
        true if the cluster definition already contains the provided member