Class TdbGridCluster

All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink, TdbControlObjectProvider, Iterable<TdbGridClusterMember>

public class TdbGridCluster extends TdbMessageProvider implements com.tietoenator.trip.jxp.internal.utils.DOMSink, TdbControlObjectProvider, Iterable<TdbGridClusterMember>
Container and manipulation logic for a TRIPgrid cluster
  • Constructor Details

    • 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 Details

    • getControlObject

      public TdbControlObject getControlObject()
      Retrieve the underlying control object for the cluster
      Specified by:
      getControlObject in interface TdbControlObjectProvider
      Returns:
      The Control object reference with which this object was created
    • getName

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

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

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

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

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

      public Iterator<TdbGridClusterMember> iterator()
      Retrieve an iterator over the grid cluster's membership list
      Specified by:
      iterator in interface 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(String name, 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(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(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