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 TypeMethodDescriptionvoid
add
(TdbGridReplicaSetMember member) Add a new member to the replica setboolean
contains
(TdbGridReplicaSetMember member) Check if the replica set already contains a given membervoid
create()
Create a new grid replica set -- this method uses the information from the Control object provided during construction to create the replica set.void
Create a new grid replica set.void
get()
Retrieve the current replication set from the grid.void
Refresh 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 setvoid
put()
Store the contents of the replica set to the grid.void
remove()
Delete an existing replica set -- this method uses the information from the Control object provided during construction to name the replica set.void
Delete an existing replica set.void
Rename an existing replica set.void
setComment
(String comment) Establish the description of the replica setvoid
Establish the name of the replica setMethods 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
-
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:
getControlObject
in 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:
iterator
in 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
-