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:
  1. during the initial handshake with the driver
  2. at regular intervals via a specific timer
The duration of the interval between periodic checks is configurable with the following property expressing a time in milliseconds (default 2000 ms):
jppf.node.throttling.check.period = 2000
Author:
Laurent Cohen
  • Constructor Details

    • NodeThrottlingHandler

      public NodeThrottlingHandler(JPPFNode node)
      Initialize ths handler with the specified node.
      Parameters:
      node - the node to which the throttling applies.
  • Method Details

    • start

      public NodeThrottlingHandler start()
      Start this NodeThrottlingHandler.
      Returns:
      this NodeThrottlingHandler, for method call chaining.
    • stop

      public NodeThrottlingHandler stop()
      Stop this NodeThrottlingHandler and release its resources.
      Returns:
      this NodeThrottlingHandler, for method call chaining.
    • check

      public boolean check()
      Returns:
      true if the node accepts new jobs, false otherwise.