Interface MaintenanceModeMBean
-
- All Superinterfaces:
javax.management.NotificationBroadcaster
,javax.management.NotificationEmitter
public interface MaintenanceModeMBean extends javax.management.NotificationEmitter
The MaintenanceModeMBean defines the management interface for maintenance mode operations for servers and hosts within a collective.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".
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
OBJECT_NAME
A String representing theObjectName
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.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
OBJECT_NAME
static final java.lang.String OBJECT_NAME
A String representing theObjectName
that this MBean maps to.- See Also:
- Constant Field Values
-
STATUS_IN_MAINTENANCE_MODE
static final java.lang.String STATUS_IN_MAINTENANCE_MODE
Status value indicating a host or server is in maintenance mode.- See Also:
- Constant Field Values
-
STATUS_NOT_IN_MAINTENANCE_MODE
static final java.lang.String STATUS_NOT_IN_MAINTENANCE_MODE
Status value indicating a host or server is not in maintenance mode.- See Also:
- Constant Field Values
-
STATUS_ALTERNATE_SERVER_IS_STARTING
static final java.lang.String STATUS_ALTERNATE_SERVER_IS_STARTING
Status value indicating that an alternate server is starting to replace this server. Maintenance mode is set when the alternate server is started.- See Also:
- Constant Field Values
-
STATUS_ALTERNATE_SERVER_IS_NOT_AVAILABLE
static final java.lang.String STATUS_ALTERNATE_SERVER_IS_NOT_AVAILABLE
Status value indicating maintenance mode was not set because an alternate server was not found.- See Also:
- Constant Field Values
-
STATUS_NOT_FOUND
static final java.lang.String STATUS_NOT_FOUND
Status value indicating the host or server was not found.- See Also:
- Constant Field Values
-
STATUS_FAILURE
static final java.lang.String STATUS_FAILURE
Status value indicating the requested operation could not be completed because of an unexpected error. The server logs should have more information about the error.- See Also:
- Constant Field Values
-
-
Method Detail
-
enterHostMaintenanceMode
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. Setting a host into maintenance mode prevents the scaling controller from provisioning new servers on the host. It also places all servers on the host into maintenance mode.- Parameters:
hostNames
- A list of host names.maintainAffinity
- Iftrue
session affinity is kept (requests that have session affinity to a server in maintenance mode are still routed to the server). Iffalse
session affinity is broken immediately.force
- Iftrue
maintenance mode is set regardless of the auto-scaling policy. Iffalse
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 ifforce
isfalse
, some hosts in the list may be placed in maintenance mode while others may not due to policy violation.- Returns:
- A list of maps which describe the outcome of the request. The list entry order corresponds with the hostNames list. Each map has an entry for the host name and entries for the server tuples on the host. The map values are status values such as STATUS_IN_MAINTENANCE_MODE, STATUS_ALTERNATE_SERVER_IS_STARTING, STATUS_ALTERNATE_SERVER_IS_NOT_AVAILABLE, STATUS_NOT_FOUND, or STATUS_FAILURE. If an error occurred, the map contains status values only for the host and/or server tuple(s) causing the error.
-
enterServerMaintenanceMode
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.- Parameters:
serverTuples
- A list of server tuples. A server tuple is defined as (hostName,wlpUserDir,serverName). SeeRepositoryPathUtilityMBean
for more information on a server tuples.maintainAffinity
- Iftrue
session affinity is kept (requests that have session affinity to a server in maintenance mode are still routed to the server). Iffalse
session affinity is broken immediately.force
- Iftrue
maintenance mode is set regardless of the auto-scaling policy. Iffalse
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 ifforce
isfalse
, some servers in the list may be placed in maintenance mode while others may not due to policy violation.- Returns:
- A list of maps which describe the outcome of the request. The list entry order corresponds with the serverTuples list. Each map has an entry for the server tuple. The map values are status values such as STATUS_IN_MAINTENANCE_MODE, STATUS_ALTERNATE_SERVER_IS_STARTING, STATUS_ALTERNATE_SERVER_IS_NOT_AVAILABLE, STATUS_NOT_FOUND, or STATUS_FAILURE.
-
exitHostMaintenanceMode
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. Resetting a host from maintenance mode allows the scaling controller to provision new servers on the host (if it is configured to do so). It also resets all servers on the host from maintenance mode.- Parameters:
hostNames
- A list of host names.- Returns:
- A list of maps which describe the outcome of the request. The list entry order corresponds with the hostNames list. Each map has an entry for the host name and entries for the server tuples on the host. The map values are status values such as STATUS_NOT_IN_MAINTENANCE_MODE, STATUS_NOT_FOUND, or STATUS_FAILURE. If an error occurred, the map contains status values only for the host and/or server tuple(s) causing the error.
-
exitServerMaintenanceMode
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.- Parameters:
serverTuples
- A list of server tuples. A server tuple is defined as (hostName,wlpUserDir,serverName). SeeRepositoryPathUtilityMBean
for more information on a server tuples.- Returns:
- A list of maps which describe the outcome of the request. The list entry order corresponds with the serverTuples list. Each map has an entry for the server tuple. The map values are status values such as STATUS_NOT_IN_MAINTENANCE_MODE, STATUS_NOT_FOUND, or STATUS_FAILURE.
-
getHostMaintenanceMode
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.- Parameters:
hostNames
- A list of host names.- Returns:
- A list of maps which describe the outcome of the request. The list entry order corresponds with the hostNames list. Each map has an entry for the host name and entries for the server tuples on the host. The map values are status values such as STATUS_IN_MAINTENANCE_MODE, STATUS_NOT_IN_MAINTENANCE_MODE, STATUS_ALTERNATE_SERVER_IS_STARTING, STATUS_NOT_FOUND, or STATUS_FAILURE.
-
getServerMaintenanceMode
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.- Parameters:
serverTuples
- A list of server tuples. A server tuple is defined as (hostName,wlpUserDir,serverName). SeeRepositoryPathUtilityMBean
for more information on a server tuples.- Returns:
- A list of maps which describe the outcome of the request. The list entry order corresponds with the serverTuples list. Each map has an entry for the server tuple. The map values are status values such as STATUS_IN_MAINTENANCE_MODE, STATUS_NOT_IN_MAINTENANCE_MODE, STATUS_ALTERNATE_SERVER_IS_STARTING, STATUS_NOT_FOUND, or STATUS_FAILURE.
-
-