public interface RepositoryConfigurationMBean
The ObjectName for this MBean is "WebSphere:feature=collectiveController,type=RepositoryConfiguration,name=RepositoryConfiguration".
Replicas may be added and removed from a live replica set. Additionally, the entire replica set may be redefined, as long as one of the replicas in the previous set exists in the new set.
All endpoints specified to this MBean expect the replicaHost and replicaPort values defined in the server.xml of each replica. For example:
<collectiveController replicaHost="localhost" replicaPort="10011" />The endpoint would be "localhost:10011".
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OBJECT_NAME
A String representing the
ObjectName that this
MBean maps to. |
Modifier and Type | Method and Description |
---|---|
boolean |
addReplica(java.lang.String endpoint)
Adds a replica endpoint to the active replica set.
|
java.util.Set<java.lang.String> |
getActiveReplicas()
This method returns the active replicas as Set
|
java.util.Set<java.util.Map<java.lang.String,java.lang.String>> |
getAllReplicas()
This method returns the union of the active set, the standby set, and the configured set as set of Map
|
java.util.Set<java.lang.String> |
getConfiguredReplicas()
This method returns the configured replicas as Set
|
java.lang.String |
getReplicaId()
This method returns the ID of the current replica
|
java.util.Set<java.lang.String> |
getStandbyReplicas()
This method returns the standby replicas as Set
|
boolean |
reconfigureReplicas(java.lang.String endpoints)
Redefines the active replica set.
|
boolean |
removeReplica(java.lang.String endpoint)
Removes a replica endpoint from the existing active replica set.
|
static final java.lang.String OBJECT_NAME
ObjectName
that this
MBean maps to.java.util.Set<java.lang.String> getConfiguredReplicas() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
A replica gets into this set:
java.io.IOException
java.lang.IllegalArgumentException
java.lang.IllegalStateException
java.util.Set<java.lang.String> getActiveReplicas() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
A replica gets into this set:
java.io.IOException
java.lang.IllegalArgumentException
java.lang.IllegalStateException
java.util.Set<java.lang.String> getStandbyReplicas() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
A replica gets into this set when:
java.io.IOException
java.lang.IllegalArgumentException
java.lang.IllegalStateException
java.util.Set<java.util.Map<java.lang.String,java.lang.String>> getAllReplicas() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
This method assigns values of endpoint, status(STARTED/STOPPED), standby(TRUE/FALSE) to all of the replicas
java.io.IOException
java.lang.IllegalArgumentException
java.lang.IllegalStateException
boolean addReplica(java.lang.String endpoint) throws java.io.IOException, java.lang.IllegalArgumentException, java.net.UnknownHostException, java.lang.IllegalStateException
Only endpoints that are part of the stand-by set can be added. If the
endpoint is not part of the active or stand-by replica sets, then an
IllegalStateException will be thrown. If the endpoint is already part
of the active replica set, then no change will be made and false
will be returned.
If the endpoint is malformed, an IllegalArgumentException will be thrown.
endpoint
- The identifier for a replica in the form "host:port".true
if the replica endpoint was added, false
if
the replica endpoint was already part of the setjava.io.IOException
- If there was a problem completing the request.java.lang.IllegalArgumentException
- If the endpoint is not properly formatted. The input must be in the format "host:port".java.net.UnknownHostException
- If the host specified in the endpoint cannot be resolved via DNS.java.lang.IllegalStateException
- If the endpoint is properly formatted but it is not part of the stand-by or active replica set.boolean reconfigureReplicas(java.lang.String endpoints) throws java.io.IOException, java.lang.IllegalArgumentException, java.net.UnknownHostException
The new active replica set will be comprised solely of the supplied endpoints. The replicas for reconfiguration are represented as a space delimited list endpoints. Only endpoints that are part of the active or stand-by replica sets can be specified. If the endpoints are not part of the active or stand-by replica sets, then an IllegalStateException will be thrown.
If any of endpoints are malformed, an IllegalArgumentException will be thrown.
endpoints
- A space delimited list of the replicas of the reconfigured
replica set in the form "host:port host:port".true
if the replica reconfiguration was successful, false
if the operation was not successful.java.io.IOException
- If there was a problem completing the request.java.lang.IllegalArgumentException
- If the endpoint is not properly formatted. The input must be in the format "host:port".java.net.UnknownHostException
- If any of the hosts specified in the endpoints cannot be resolved via DNS.java.lang.IllegalStateException
- If the endpoints are properly formatted but at least one is not part of the stand-by or active replica set.boolean removeReplica(java.lang.String endpoint) throws java.io.IOException, java.lang.IllegalArgumentException, java.net.UnknownHostException
Only endpoints that are part of the configured replica set can be
removed. If the endpoint is not part of the active replica set,
then no change will be made and false
will be returned.
If the endpoint is malformed, an IllegalArgumentException will be thrown.
endpoint
- The identifier for a replica in the form "host:port".true
if the replica endpoint was removed, false
if the endpoint was not part of the active replica set.java.io.IOException
- If there was a problem completing the request.java.lang.IllegalArgumentException
- If the endpoint is not properly formatted. The input must be in the format "host:port"java.net.UnknownHostException
- If the host specified in the endpoint cannot be resolved via DNS.java.lang.String getReplicaId()