Interface MaintenanceModeMBean
- All Superinterfaces:
NotificationBroadcaster,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".
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA String representing theObjectNamethat this MBean maps to.static final StringStatus value indicating maintenance mode was not set because an alternate server was not found.static final StringStatus value indicating that an alternate server is starting to replace this server.static final StringStatus value indicating the requested operation could not be completed because of an unexpected error.static final StringStatus value indicating a host or server is in maintenance mode.static final StringStatus value indicating the host or server was not found.static final StringStatus value indicating a host or server is not in maintenance mode. -
Method Summary
Modifier and TypeMethodDescriptionenterHostMaintenanceMode(List<String> hostNames, boolean maintainAffinity, boolean force) Sets one or more registered hosts in a collective into maintenance mode.enterServerMaintenanceMode(List<String> serverTuples, boolean maintainAffinity, boolean force) Sets one or more registered servers in a collective into maintenance mode.exitHostMaintenanceMode(List<String> hostNames) Resets one or more registered hosts in a collective from maintenance mode.exitServerMaintenanceMode(List<String> serverTuples) Resets one or more registered servers in a collective from maintenance mode.getHostMaintenanceMode(List<String> hostNames) Returns whether one or more registered hosts are in maintenance mode.getServerMaintenanceMode(List<String> serverTuples) Returns whether one or more registered servers are in maintenance mode.Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListenerMethods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
-
Field Details
-
OBJECT_NAME
A String representing theObjectNamethat this MBean maps to.- See Also:
-
STATUS_IN_MAINTENANCE_MODE
Status value indicating a host or server is in maintenance mode.- See Also:
-
STATUS_NOT_IN_MAINTENANCE_MODE
Status value indicating a host or server is not in maintenance mode.- See Also:
-
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:
-
STATUS_ALTERNATE_SERVER_IS_NOT_AVAILABLE
Status value indicating maintenance mode was not set because an alternate server was not found.- See Also:
-
STATUS_NOT_FOUND
Status value indicating the host or server was not found.- See Also:
-
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:
-
-
Method Details
-
enterHostMaintenanceMode
List<Map<String,String>> enterHostMaintenanceMode(List<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- Iftruesession affinity is kept (requests that have session affinity to a server in maintenance mode are still routed to the server). Iffalsesession affinity is broken immediately.force- Iftruemaintenance mode is set regardless of the auto-scaling policy. Iffalsemaintenance 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 ifforceisfalse, 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
List<Map<String,String>> enterServerMaintenanceMode(List<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). SeeRepositoryPathUtilityMBeanfor more information on a server tuples.maintainAffinity- Iftruesession affinity is kept (requests that have session affinity to a server in maintenance mode are still routed to the server). Iffalsesession affinity is broken immediately.force- Iftruemaintenance mode is set regardless of the auto-scaling policy. Iffalsemaintenance 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 ifforceisfalse, 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
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
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). SeeRepositoryPathUtilityMBeanfor 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
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
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). SeeRepositoryPathUtilityMBeanfor 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.
-