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
ConstructorsConstructorDescriptionTdbGridCluster
(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
Modifier and TypeMethodDescriptionvoid
add
(TdbGridClusterMember member) Add a cluster member to the clusterboolean
contains
(TdbGridClusterMember member) Check if the cluster already contains a given member.void
Create a new grid cluster.void
get()
Refresh the contents of the cluster from the grid.Retrieve the description of the clusterRetrieve the underlying control object for the clustergetName()
Retrieve the name of the clusteriterator()
Retrieve an iterator over the grid cluster's membership listmembers()
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 a named cluster from the grid.void
Rename an existing cluster.void
setComment
(String comment) Set the description of the clustervoid
Set the name of the clusterMethods 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
Constructor, creates a blank container for a new cluster- Parameters:
session
- Active session- Throws:
TdbException
-
TdbGridCluster
Constructor, creates a container for referencing the defined cluster- Parameters:
session
- Active sessionob
- Control object referencing the cluster- Throws:
TdbException
-
-
Method Details
-
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
Retrieve the name of the cluster- Returns:
- Cluster name
-
setName
Set the name of the cluster- Parameters:
name
- Name of cluster
-
getComment
Retrieve the description of the cluster- Returns:
- Cluster description, if any
-
setComment
Set the description of the cluster- Parameters:
comment
- Cluster description, if any
-
members
Retrieve the grid cluster's membership list- Returns:
- Cluster membership list
-
iterator
Retrieve an iterator over the grid cluster's membership list- Specified by:
iterator
in interfaceIterable<TdbGridClusterMember>
- Returns:
- Cluster membership list iterator
-
add
Add a cluster member to the cluster- Parameters:
member
- The new member to add to the cluster
-
create
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
Remove a named cluster from the grid.This method causes network I/O.
- Parameters:
name
- Name of the cluster to remove- Throws:
TdbException
-
remove
Remove the current cluster from the grid.This method causes network I/O.
- Throws:
TdbException
-
rename
Rename an existing cluster.This method causes network I/O.
- Parameters:
newname
- The new name of the cluster- Throws:
TdbException
-
get
Refresh the contents of the cluster from the grid.This method causes network I/O.
- Throws:
TdbException
-
put
Store the contents of the cluster to the grid.This method causes network I/O.
- Throws:
TdbException
-
contains
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
-