Package org.jppf.node.throttling
Class NodeThrottlingHandler
java.lang.Object
org.jppf.utils.ServiceProviderHandler<JPPFNodeThrottling>
org.jppf.node.throttling.NodeThrottlingHandler
public class NodeThrottlingHandler
extends org.jppf.utils.ServiceProviderHandler<JPPFNodeThrottling>
This class loads and invokes all implementations of the
JPPFNodeThrottling service found in the classpath.
Invocation of the services is done at two points of the node's life cycle:
- during the initial handshake with the driver
- at regular intervals via a specific timer
jppf.node.throttling.check.period = 2000- Author:
- Laurent Cohen
-
Field Summary
Fields inherited from class org.jppf.utils.ServiceProviderHandler
classLoader, inf, providers -
Constructor Summary
ConstructorsConstructorDescriptionInitialize ths handler with the specified node. -
Method Summary
Methods inherited from class org.jppf.utils.ServiceProviderHandler
addProvider, getProviders, loadProviders, removeAllProviders, removeProvider
-
Constructor Details
-
NodeThrottlingHandler
Initialize ths handler with the specified node.- Parameters:
node- the node to which the throttling applies.
-
-
Method Details
-
start
Start thisNodeThrottlingHandler.- Returns:
- this
NodeThrottlingHandler, for method call chaining.
-
stop
Stop thisNodeThrottlingHandlerand release its resources.- Returns:
- this
NodeThrottlingHandler, for method call chaining.
-
check
public boolean check()- Returns:
trueif the node accepts new jobs,falseotherwise.
-