Package com.tietoenator.trip.jxp.grid
Class TdbGridReplicaSet
java.lang.Object
com.tietoenator.trip.jxp.session.TdbSessionObject
com.tietoenator.trip.jxp.TdbMessageProvider
com.tietoenator.trip.jxp.grid.TdbGridReplicaSet
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink,TdbControlObjectProvider,Iterable<TdbGridReplicaSetMember>
public class TdbGridReplicaSet
extends TdbMessageProvider
implements com.tietoenator.trip.jxp.internal.utils.DOMSink, TdbControlObjectProvider, Iterable<TdbGridReplicaSetMember>
TdbGridReplicaSet encapsulates a particular replica set on the grid, and provides
operations to manipulate that set.
-
Constructor Summary
ConstructorsConstructorDescriptionTdbGridReplicaSet(TdbSession session) Constructor, creates a blank instanceTdbGridReplicaSet(TdbSession session, TdbControlObject ob) Constructor, creates an instance for the replica set referenced -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(TdbGridReplicaSetMember member) Add a new member to the replica setbooleancontains(TdbGridReplicaSetMember member) Check if the replica set already contains a given membervoidcreate()Create a new grid replica set -- this method uses the information from the Control object provided during construction to create the replica set.voidCreate a new grid replica set.voidget()Retrieve the current replication set from the grid.voidRefresh the contents of the named replica set from the grid.Retrieve the description of the replica setRetrieve the underlying control object for the replica setgetName()Retrieve the name of the replica setiterator()Retrieve an iterator on the membership listmembers()Retrieve a collection of members for the replica setvoidput()Store the contents of the replica set to the grid.voidremove()Delete an existing replica set -- this method uses the information from the Control object provided during construction to name the replica set.voidDelete an existing replica set.voidRename an existing replica set.voidsetComment(String comment) Establish the description of the replica setvoidEstablish the name of the replica setMethods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessagesMethods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject
cancel, getSession, isCancelable, setCancelableMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TdbGridReplicaSet
Constructor, creates a blank instance- Parameters:
session- Active session- Throws:
TdbException
-
TdbGridReplicaSet
Constructor, creates an instance for the replica set referenced- Parameters:
session- Active sessionob- Control object reference for the replica set- Throws:
TdbException
-
-
Method Details
-
getName
Retrieve the name of the replica set- Returns:
- Replica set name
-
setName
Establish the name of the replica set- Parameters:
name- Replica set name
-
getComment
Retrieve the description of the replica set- Returns:
- Replica set description, if any
-
setComment
Establish the description of the replica set- Parameters:
comment- Replica set description
-
getControlObject
Retrieve the underlying control object for the replica set- Specified by:
getControlObjectin interfaceTdbControlObjectProvider- Returns:
- Control object reference that was used to construct the instance
-
contains
Check if the replica set already contains a given member- Parameters:
member- The replica set member to check for containment- Returns:
- true if the replica set contains the provided member
-
iterator
Retrieve an iterator on the membership list- Specified by:
iteratorin interfaceIterable<TdbGridReplicaSetMember>- Returns:
- An iterator over the collection of members
-
members
Retrieve a collection of members for the replica set- Returns:
- A collection of members
-
add
Add a new member to the replica set- Parameters:
member- The new member to add to the replica set
-
create
Create a new grid replica set.This method causes network I/O.
- Parameters:
name- The name of the new replica setcomment- A comment to store along with the replica set- Throws:
TdbException
-
create
Create a new grid replica set -- this method uses the information from the Control object provided during construction to create the replica set.This method causes network I/O.
- Throws:
TdbException
-
remove
Delete an existing replica set.This method causes network I/O.
- Parameters:
name- Name of the replica set to remove- Throws:
TdbException
-
remove
Delete an existing replica set -- this method uses the information from the Control object provided during construction to name the replica set.This method causes network I/O.
- Throws:
TdbException
-
rename
Rename an existing replica set.This method causes network I/O.
- Parameters:
newname- The new name of the replica set- Throws:
TdbException
-
get
Refresh the contents of the named replica set from the grid.This method causes network I/O.
- Parameters:
name- The name of the replica set to retrieve- Throws:
TdbException
-
get
Retrieve the current replication set from the grid.This method causes network I/O.
- Throws:
TdbException
-
put
Store the contents of the replica set to the grid.This method causes network I/O.
- Throws:
TdbException
-