
org.jppf.management.JPPFDriverAdminMBean Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jppf-common Show documentation
Show all versions of jppf-common Show documentation
JPPF, the open source grid computing solution
/*
* JPPF.
* Copyright (C) 2005-2015 JPPF Team.
* http://www.jppf.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jppf.management;
import java.util.*;
import org.jppf.load.balancer.LoadBalancingInformation;
import org.jppf.node.policy.ExecutionPolicy;
import org.jppf.utils.stats.JPPFStatistics;
/**
* MBean interface for the management of a JPPF driver.
* @author Laurent Cohen
*/
public interface JPPFDriverAdminMBean extends JPPFAdminMBean {
/**
* Name of the driver's admin MBean.
*/
String MBEAN_NAME = "org.jppf:name=admin,type=driver";
/**
* Get the latest statistics snapshot from the JPPF driver.
* @return a JPPFStatistics
instance.
* @throws Exception if any error occurs.
*/
JPPFStatistics statistics() throws Exception;
/**
* Get the number of nodes attached to the driver.
* Note that this method is equivalent to calling {@link #nbNodes(NodeSelector) nbNodes(null)}.
* @return the number of nodes, or -1 if information on the nodes could not be retrieved.
* @throws Exception if any error occurs.
*/
Integer nbNodes() throws Exception;
/**
* Get the number of nodes attached to the driver that satisfy the specified selector.
* @param selector specifies which nodes shouyld be counted. If null, then {@link NodeSelector#ALL_NODES} will be used.
* @return the number of nodes, or -1 if information on the nodes could not be retrieved.
* @throws Exception if any error occurs.
* @since 5.0
*/
Integer nbNodes(NodeSelector selector) throws Exception;
/**
* Request the JMX connection information for all the nodes attached to the server.
* Note that this method is equivalent to calling {@link #nodesInformation(NodeSelector, boolean) nodesInformation(null, false)}.
* @return a collection of {@link JPPFManagementInfo} instances, or {@code null} if information on the nodes could not be retrieved.
* @throws Exception if any error occurs.
*/
Collection nodesInformation() throws Exception;
/**
* Request the JMX connection information for all the nodes attached to the server which satisfy the specified selector.
* Note that this method is equivalent to calling {@link #nodesInformation(NodeSelector, boolean) nodesInformation(selector, false)}.
* @param selector specifies which nodes shouyld be counted. If {@code null}, then {@link NodeSelector#ALL_NODES} will be used.
* @return a collection of {@link JPPFManagementInfo} instances, or {@code null} if information on the nodes could not be retrieved.
* @throws Exception if any error occurs.
*/
Collection nodesInformation(NodeSelector selector) throws Exception;
/**
* Request the JMX connection information for all the nodes attached to the server which satisfy the specified selector.
* @param selector specifies which nodes shouyld be counted. If {@code null}, then {@link NodeSelector#ALL_NODES} will be used.
* @param includePeers whether peer drivers should be counted as nodes and included.
* @return a collection of {@link JPPFManagementInfo} instances, or {@code null} if information on the nodes could not be retrieved.
* @throws Exception if any error occurs.
*/
Collection nodesInformation(NodeSelector selector, final boolean includePeers) throws Exception;
/**
* Perform a shutdown or restart of the server.
* @param shutdownDelay the delay before shutting down the server, once the command is received.
* @param restartDelay the delay before restarting, once the server is shutdown. If it is < 0, no restart occurs.
* @return an acknowledgement message.
* @throws Exception if any error occurs.
*/
String restartShutdown(Long shutdownDelay, Long restartDelay) throws Exception;
/**
* Change the bundle size tuning settings.
* @param algorithm the name opf the load-balancing algorithm to set.
* @param parameters the algorithm's parameters.
* @return an acknowledgement or error message.
* @throws Exception if an error occurred while updating the settings.
*/
String changeLoadBalancerSettings(String algorithm, Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy