public interface MaintenanceModeMBean
extends javax.management.NotificationEmitter
Set maintenance mode before you perform diagnostic tests, maintenance, or tuning on a host or server. Maintenance mode can prevent the disruption of client requests by routing client traffic that is targeted for a server or host that is in maintenance mode to another server or host.
Setting a server into maintenance mode is a persistent change. A server remains in maintenance mode even if the server is restarted until the mode is explicitly changed.
When a server that has the scaling member feature is in maintenance mode, the scaling controller cannot control that server. The server does not count toward the minimum or maximum running instances setting for the cluster. When the server is placed into maintenance mode, the scaling controller will start an alternate server if necessary to meet the required minimum number of running instances or to meet current workload demand.
The ObjectName for this MBean is "WebSphere:feature=collectiveController,type=MaintenanceMode,name=MaintenanceMode".
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OBJECT_NAME
A String representing the
ObjectName that this MBean maps to. |
static java.lang.String |
STATUS_ALTERNATE_SERVER_IS_NOT_AVAILABLE
Status value indicating maintenance mode was not set because an alternate
server was not found.
|
static java.lang.String |
STATUS_ALTERNATE_SERVER_IS_STARTING
Status value indicating that an alternate server is starting to replace
this server.
|
static java.lang.String |
STATUS_FAILURE
Status value indicating the requested operation could not be completed because of an
unexpected error.
|
static java.lang.String |
STATUS_IN_MAINTENANCE_MODE
Status value indicating a host or server is in maintenance mode.
|
static java.lang.String |
STATUS_NOT_FOUND
Status value indicating the host or server was not found.
|
static java.lang.String |
STATUS_NOT_IN_MAINTENANCE_MODE
Status value indicating a host or server is not in maintenance mode.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
enterHostMaintenanceMode(java.util.List<java.lang.String> hostNames,
boolean maintainAffinity,
boolean force)
Sets one or more registered hosts in a collective into maintenance mode.
|
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
enterServerMaintenanceMode(java.util.List<java.lang.String> serverTuples,
boolean maintainAffinity,
boolean force)
Sets one or more registered servers in a collective into maintenance mode.
|
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
exitHostMaintenanceMode(java.util.List<java.lang.String> hostNames)
Resets one or more registered hosts in a collective from maintenance mode.
|
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
exitServerMaintenanceMode(java.util.List<java.lang.String> serverTuples)
Resets one or more registered servers in a collective from maintenance mode.
|
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
getHostMaintenanceMode(java.util.List<java.lang.String> hostNames)
Returns whether one or more registered hosts are in maintenance mode.
|
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
getServerMaintenanceMode(java.util.List<java.lang.String> serverTuples)
Returns whether one or more registered servers are in maintenance mode.
|
static final java.lang.String OBJECT_NAME
ObjectName
that this MBean maps to.static final java.lang.String STATUS_IN_MAINTENANCE_MODE
static final java.lang.String STATUS_NOT_IN_MAINTENANCE_MODE
static final java.lang.String STATUS_ALTERNATE_SERVER_IS_STARTING
static final java.lang.String STATUS_ALTERNATE_SERVER_IS_NOT_AVAILABLE
static final java.lang.String STATUS_NOT_FOUND
static final java.lang.String STATUS_FAILURE
java.util.List<java.util.Map<java.lang.String,java.lang.String>> enterHostMaintenanceMode(java.util.List<java.lang.String> hostNames, boolean maintainAffinity, boolean force)
hostNames
- A list of host names.maintainAffinity
- If true
session affinity is kept (requests that have session affinity
to a server in maintenance mode are still routed to the server).
If false
session affinity is broken immediately.force
- If true
maintenance mode is set regardless of the auto-scaling policy.
If false
maintenance mode is not set if it causes a violation of the
auto-scaling policy because the minimum instance requirement can't be met
or resource usage goes beyond the threshold specified in the auto-scaling policy.
Note that this evaluation is done independently for each host in the hostName list,
so if force
is false
, some hosts in the list may be placed
in maintenance mode while others may not due to policy violation.java.util.List<java.util.Map<java.lang.String,java.lang.String>> enterServerMaintenanceMode(java.util.List<java.lang.String> serverTuples, boolean maintainAffinity, boolean force)
serverTuples
- A list of server tuples. A server tuple is defined as
(hostName,wlpUserDir,serverName). See RepositoryPathUtilityMBean
for
more information on a server tuples.maintainAffinity
- If true
session affinity is kept (requests that have
session affinity to a server in maintenance mode are still routed to the server).
If false
session affinity is broken immediately.force
- If true
maintenance mode is set regardless of the auto-scaling policy.
If false
maintenance mode is not set if it causes a violation of the
auto-scaling policy because the minimum instance requirement can't be met
or resource usage goes beyond the threshold specified in the auto-scaling policy.
Note that this evaluation is done independently for each server in the serverTuples list,
so if force
is false
, some servers in the list may be placed
in maintenance mode while others may not due to policy violation.java.util.List<java.util.Map<java.lang.String,java.lang.String>> exitHostMaintenanceMode(java.util.List<java.lang.String> hostNames)
hostNames
- A list of host names.java.util.List<java.util.Map<java.lang.String,java.lang.String>> exitServerMaintenanceMode(java.util.List<java.lang.String> serverTuples)
serverTuples
- A list of server tuples. A server tuple is defined as
(hostName,wlpUserDir,serverName). See RepositoryPathUtilityMBean
for
more information on a server tuples.java.util.List<java.util.Map<java.lang.String,java.lang.String>> getHostMaintenanceMode(java.util.List<java.lang.String> hostNames)
hostNames
- A list of host names.java.util.List<java.util.Map<java.lang.String,java.lang.String>> getServerMaintenanceMode(java.util.List<java.lang.String> serverTuples)
serverTuples
- A list of server tuples. A server tuple is defined as
(hostName,wlpUserDir,serverName). See RepositoryPathUtilityMBean
for
more information on a server tuples.