IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.management
Interface ContainerMBean

All Known Subinterfaces:
Container

public interface ContainerMBean

This MBean interface allows a client process to perform operations on and get status from an ObjectGrid container running in a dynamic environment. The object name pattern for this MBean is:

 com.ibm.websphere.objectgrid:type=ObjectGridContainer,name=<server>,host=<host>,ogServerName=<server>
 
If ObjectGrid is running in a WebSphere Application Server process, more key=value pairs may be added to the object name.

Since:
WAS XD 6.1 FIX3, XC10

Field Summary
static String INVALID_PARTITION
          INVALID_PARTITION indicates that no partition was found for the requested shard.
static String MAPSET_UNSUPPORTED_ON_CONTAINER
          MAPSET_UNSUPPORTED_ON_CONTAINER indicates that an attempt was made to reserve a shard from a map set that is not supported on this container.
static String QUIESCE_COMPLETE
          QUIESCE_COMPLETE is the MBean notification type for a completed quiesce.
static String RELEASE_SUCCESSFUL
          RELEASE_SUCCESSFUL indicates that the attempt to release the shard was successful.
static String RELEASE_UNSUPPORTED_WITH_PER_CONTAINER
          RELEASE_UNSUPPORTED_WITH_PER_CONTAINER indicates that the shard is part of a map set using the PER_CONTAINER placement strategy.
static String RESERVATION_PRIOR_TO_INITIAL_PLACEMENT
          RESERVATION_PRIOR_TO_INITIAL_PLACEMENT indicates that the attempt to reserve the shard was processed successfully.
static String RESERVATION_SUCCESSFUL
          RESERVATION_SUCCESSFUL indicates that the attempt to reserve the shard was successful.
static String RESERVE_UNSUPPORTED_WITH_PER_CONTAINER
          RESERVE_UNSUPPORTED_WITH_PER_CONTAINER indicates that the shard is part of a map set using the PER_CONTAINER placement strategy.
static String SHARD_ALREADY_RESERVED
          SHARD_ALREADY_RESERVED indicates that the shard is already reserved elsewhere and cannot be reserved on the specified container.
static String SHARD_NOT_RESERVED_ON_CONTAINER
          SHARD_NOT_RESERVED_ON_CONTAINER indicates that the attempt to release the shard from the requesting container failed because the specified shard was not found to be reserved by the requesting container.
 
Method Summary
 int getActivatedShardCount()
          Retrieve the total number of shards that have been activated for the life of this ObjectGrid container.
 int getActiveShardCount()
          Retrieve the number of active shards hosted in this ObjectGrid container.
 String getContainerName()
          Retrieve the name of the container.
 int getDeactivatedShardCount()
          Retrieve the total number of shards that have been deactivated for the life of this ObjectGrid container.
 String getDomainName()
          Retrieve the name of the catalog server grouping administering this container.
 String getStatus()
          Retrieve the status information for the shards in this container.
 String getZoneName()
          Retrieve the name of the zone grouping that this container belongs to.
 int quiesceContainer(Boolean inQuiesce)
          Prepare the container for a potential shutdown by moving replica shards, verifying that primaries have required sync replicas and preventing the placement of new shards.
 String release(String objectGridName, String mapSetName, String partitionName)
          Release a shard that has been previously reserved by this container.
 String reserve(String objectGridName, String mapSetName, String partitionName, String shardType)
          Reserve a specific shard on this container.
 String retrieveStatus(String objectGridName, String mapSetName)
          Retrieve the status information for the shards in this container, filtered by ObjectGrid and/or mapset.
 void teardown()
          Tears down and stops the container in a way to allow partitions to be moved to new locations.
 void terminate()
          Terminates a container without coordinating partition movement, partitions will failover.
 

Field Detail

QUIESCE_COMPLETE

static final String QUIESCE_COMPLETE
QUIESCE_COMPLETE is the MBean notification type for a completed quiesce.

See Also:
quiesceContainer(Boolean), Constant Field Values

RESERVATION_SUCCESSFUL

static final String RESERVATION_SUCCESSFUL
RESERVATION_SUCCESSFUL indicates that the attempt to reserve the shard was successful. The shard is reserved by the requesting container.

Since:
7.0.0.0 FIX1
See Also:
reserve(String, String, String, String), Constant Field Values

RESERVATION_PRIOR_TO_INITIAL_PLACEMENT

static final String RESERVATION_PRIOR_TO_INITIAL_PLACEMENT
RESERVATION_PRIOR_TO_INITIAL_PLACEMENT indicates that the attempt to reserve the shard was processed successfully. However, since initial placement has not yet occurred, the reserved shard is not immediately moved to the requesting container. The shard will be placed on the container when initial placement is triggered.

Since:
7.0.0.0 FIX1
See Also:
reserve(String, String, String, String), Constant Field Values

SHARD_ALREADY_RESERVED

static final String SHARD_ALREADY_RESERVED
SHARD_ALREADY_RESERVED indicates that the shard is already reserved elsewhere and cannot be reserved on the specified container. The shard must be released from the owning container before it can be reserved again.

Since:
7.0.0.0 FIX1
See Also:
reserve(String, String, String, String), Constant Field Values

INVALID_PARTITION

static final String INVALID_PARTITION
INVALID_PARTITION indicates that no partition was found for the requested shard.

Since:
7.0.0.0 FIX1
See Also:
reserve(String, String, String, String), Constant Field Values

RESERVE_UNSUPPORTED_WITH_PER_CONTAINER

static final String RESERVE_UNSUPPORTED_WITH_PER_CONTAINER
RESERVE_UNSUPPORTED_WITH_PER_CONTAINER indicates that the shard is part of a map set using the PER_CONTAINER placement strategy. Shard reservation is not supported with this placement strategy.

Since:
7.0.0.0 FIX1
See Also:
reserve(String, String, String, String), Constant Field Values

RELEASE_SUCCESSFUL

static final String RELEASE_SUCCESSFUL
RELEASE_SUCCESSFUL indicates that the attempt to release the shard was successful. The shard is no longer reserved by this container. The shard is free to migrate, but it is not forced to migrate.

Since:
7.0.0.0 FIX1
See Also:
release(String, String, String), Constant Field Values

SHARD_NOT_RESERVED_ON_CONTAINER

static final String SHARD_NOT_RESERVED_ON_CONTAINER
SHARD_NOT_RESERVED_ON_CONTAINER indicates that the attempt to release the shard from the requesting container failed because the specified shard was not found to be reserved by the requesting container. Only the container owning the reservation may release a shard.

Since:
7.0.0.0 FIX1
See Also:
release(String, String, String), Constant Field Values

RELEASE_UNSUPPORTED_WITH_PER_CONTAINER

static final String RELEASE_UNSUPPORTED_WITH_PER_CONTAINER
RELEASE_UNSUPPORTED_WITH_PER_CONTAINER indicates that the shard is part of a map set using the PER_CONTAINER placement strategy. Shard release is not supported with this placement strategy.

Since:
7.0.0.0 FIX1
See Also:
release(String, String, String), Constant Field Values

MAPSET_UNSUPPORTED_ON_CONTAINER

static final String MAPSET_UNSUPPORTED_ON_CONTAINER
MAPSET_UNSUPPORTED_ON_CONTAINER indicates that an attempt was made to reserve a shard from a map set that is not supported on this container. Only map sets that were included in the deployment policy at container initialization are supported to run on this container.

Since:
7.1
See Also:
reserve(String, String, String, String), Constant Field Values
Method Detail

teardown

void teardown()
Tears down and stops the container in a way to allow partitions to be moved to new locations.


terminate

void terminate()
Terminates a container without coordinating partition movement, partitions will failover.


getActiveShardCount

int getActiveShardCount()
Retrieve the number of active shards hosted in this ObjectGrid container.

Returns:
The current number of active shards.

getActivatedShardCount

int getActivatedShardCount()
Retrieve the total number of shards that have been activated for the life of this ObjectGrid container.

Returns:
The number of activated shards.

getDeactivatedShardCount

int getDeactivatedShardCount()
Retrieve the total number of shards that have been deactivated for the life of this ObjectGrid container.

Returns:
The number of deactivated shards

getDomainName

String getDomainName()
Retrieve the name of the catalog server grouping administering this container.

Returns:
The domain name.

getZoneName

String getZoneName()
Retrieve the name of the zone grouping that this container belongs to.

Returns:
The name of the zone.

quiesceContainer

int quiesceContainer(Boolean inQuiesce)
Prepare the container for a potential shutdown by moving replica shards, verifying that primaries have required sync replicas and preventing the placement of new shards.

Parameters:
inQuiesce - Initiate quiesce mode (true) or cancel quiesce mode (false)
Returns:
The number of replicas moved off of the ObjectGrid container
See Also:
QUIESCE_COMPLETE

getStatus

String getStatus()
Retrieve the status information for the shards in this container.

Returns:
The status information for the shards in this container.

retrieveStatus

String retrieveStatus(String objectGridName,
                      String mapSetName)
Retrieve the status information for the shards in this container, filtered by ObjectGrid and/or mapset. For example, calling retrieveStatus with "og1" and "ms1" as parameters will return the partition status for those partitions in ObjectGrid og1 and mapset ms1. Passing in an empty string ("") objectGridName or mapSetName will return all of the partitions, since the empty string acts as a wildcard. Passing in the empty string for both parameters will return the same status as calling getStatus().

Parameters:
objectGridName - The name of the ObjectGrid for which the status is requested.
mapSetName - The name of the mapset within the ObjectGrid for which the status is requested.
Returns:
The status information for the shards in this container.

reserve

String reserve(String objectGridName,
               String mapSetName,
               String partitionName,
               String shardType)
Reserve a specific shard on this container. Calling this method will cause the requested shard to move to this container. The shard can be moved to this container only if it is not reserved elsewhere. Calling this method prior to initial placement will pre-reserve the shard so that it will be placed onto this container when initial placement occurs. If non-reserved shard for the same partition is on this container prior to reservation, the non-reserved shard will be moved off the container upon reservation. A reserved shard will not be moved off of this container until it is released or the container is stopped.

Parameters:
objectGridName - the ObjectGrid containing the shard
mapSetName - the map set containing the shard
partitionName - the partition containing the shard
shardType - the type of shard. Currently, only primary shards can be reserved: ShardMBean.TYPE_PRIMARY
Returns:
the return code indicating the result of the reserve request
Throws:
IllegalArgumentException - if any of the arguments are null or the empty String. Also thrown if shardType is not ShardMBean.TYPE_PRIMARY
Since:
7.0.0.0 FIX1
See Also:
ShardMBean.TYPE_PRIMARY, release(String, String, String), RESERVATION_SUCCESSFUL, RESERVATION_PRIOR_TO_INITIAL_PLACEMENT, SHARD_ALREADY_RESERVED, INVALID_PARTITION, RESERVE_UNSUPPORTED_WITH_PER_CONTAINER

release

String release(String objectGridName,
               String mapSetName,
               String partitionName)
Release a shard that has been previously reserved by this container. This container can only release shards that it has reserved. Releasing the shard does not guarantee the shard will be moved. The shard may remain on this container. However, it will not be explicitly bound to this container. Releasing a shard allows the shard to move freely to other containers or to be reserved by another container.

Parameters:
objectGridName - the ObjectGrid containing the shard
mapSetName - the map set containing the shard
partitionName - the partition containing the shard
Returns:
the return code indicating the result of the release request
Throws:
IllegalArgumentException - if any of the arguments are null or the empty String
Since:
7.0.0.0 FIX1
See Also:
reserve(String, String, String, String), RELEASE_SUCCESSFUL, SHARD_NOT_RESERVED_ON_CONTAINER, RELEASE_UNSUPPORTED_WITH_PER_CONTAINER

getContainerName

String getContainerName()
Retrieve the name of the container. The container name is based on the server name and includes a suffix which uniquely identifies the container within the server.

Returns:
the name of the container
Since:
7.1

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.