Package com.tietoenator.trip.jxp.grid

# Class TdbGridCluster

java.lang.Object
com.tietoenator.trip.jxp.session.TdbSessionObject
com.tietoenator.trip.jxp.TdbMessageProvider
com.tietoenator.trip.jxp.grid.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 Summary

  Constructors
  Constructor
  Description
  `TdbGridCluster(TdbSession session)`
  Constructor, creates a blank container for a new cluster
  `TdbGridCluster(TdbSession session, TdbControlObject ob)`
  Constructor, creates a container for referencing the defined cluster

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(TdbGridClusterMember member)`
  Add a cluster member to the cluster
  `boolean`
  `contains(TdbGridClusterMember member)`
  Check if the cluster already contains a given member.
  `void`
  `create(String name, String comment)`
  Create a new grid cluster.
  `void`
  `get()`
  Refresh the contents of the cluster from the grid.
  `String`
  `getComment()`
  Retrieve the description of the cluster
  `TdbControlObject`
  `getControlObject()`
  Retrieve the underlying control object for the cluster
  `String`
  `getName()`
  Retrieve the name of the cluster
  `Iterator<TdbGridClusterMember>`
  `iterator()`
  Retrieve an iterator over the grid cluster's membership list
  `List<TdbGridClusterMember>`
  `members()`
  Retrieve the grid cluster's membership list
  `void`
  `put()`
  Store the contents of the cluster to the grid.
  `void`
  `remove()`
  Remove the current cluster from the grid.
  `void`
  `remove(String name)`
  Remove a named cluster from the grid.
  `void`
  `rename(String newname)`
  Rename an existing cluster.
  `void`
  `setComment(String comment)`
  Set the description of the cluster
  `void`
  `setName(String name)`
  Set the name of the cluster

  ### Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider

  `codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages`

  ### Methods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject

  `cancel, getSession, isCancelable, setCancelable`

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

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface java.lang.Iterable

  `forEach, spliterator`

- ## 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