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
,java.lang.Iterable<TdbGridClusterMember>
public class TdbGridCluster extends TdbMessageProvider implements com.tietoenator.trip.jxp.internal.utils.DOMSink, TdbControlObjectProvider, java.lang.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 clusterTdbGridCluster(TdbSession session, TdbControlObject ob)
Constructor, creates a container for referencing the defined cluster
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(TdbGridClusterMember member)
Add a cluster member to the clusterboolean
contains(TdbGridClusterMember member)
Check if the cluster already contains a given member.void
create(java.lang.String name, java.lang.String comment)
Create a new grid cluster.void
get()
Refresh the contents of the cluster from the grid.java.lang.String
getComment()
Retrieve the description of the clusterTdbControlObject
getControlObject()
Retrieve the underlying control object for the clusterjava.lang.String
getName()
Retrieve the name of the clusterjava.util.Iterator<TdbGridClusterMember>
iterator()
Retrieve an iterator over the grid cluster's membership listjava.util.List<TdbGridClusterMember>
members()
Retrieve the grid cluster's membership listvoid
put()
Store the contents of the cluster to the grid.void
remove()
Remove the current cluster from the grid.void
remove(java.lang.String name)
Remove a named cluster from the grid.void
rename(java.lang.String newname)
Rename an existing cluster.void
setComment(java.lang.String comment)
Set the description of the clustervoid
setName(java.lang.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
-
-
-
-
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 sessionob
- Control object referencing the cluster- Throws:
TdbException
-
-
Method Detail
-
getControlObject
public TdbControlObject getControlObject()
Retrieve the underlying control object for the cluster- Specified by:
getControlObject
in interfaceTdbControlObjectProvider
- Returns:
- The Control object reference with which this object was created
-
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 interfacejava.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 clustercomment
- 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
-
-