Interface JobManager

All Known Implementing Classes:
JobManagerClient

public interface JobManager
Interface for an asynchronous job submission manager.
Author:
Laurent Cohen
  • Method Details

    • submitJob

      String submitJob(JPPFJob job)
      Add a job to the execution queue.
      Parameters:
      job - encapsulation of the execution data.
      Returns:
      the unique id of the job.
    • submitJob

      String submitJob(JPPFJob job, JobStatusListener listener)
      Add a task job to the execution queue.
      Parameters:
      job - encapsulation of the execution data.
      listener - an optional listener to receive job status change notifications, may be null.
      Returns:
      the unique id of the job.
    • resubmitJob

      String resubmitJob(JPPFJob job)
      Add an existing job back into the execution queue.
      Parameters:
      job - encapsulation of the execution data.
      Returns:
      the unique id of the job.
    • hasAvailableConnection

      boolean hasAvailableConnection()
      Determine whether there is a client connection available for execution.
      Returns:
      true if at least one connection is available, false otherwise.
    • isLocalExecutionEnabled

      boolean isLocalExecutionEnabled()
      Determine whether local execution is enabled on this client.
      Returns:
      true if local execution is enabled, false otherwise.
    • setLocalExecutionEnabled

      void setLocalExecutionEnabled(boolean localExecutionEnabled)
      Specify whether local execution is enabled on this client.
      Parameters:
      localExecutionEnabled - true to enable local execution, false otherwise
    • getAvailableConnections

      Vector<JPPFClientConnection> getAvailableConnections()
      Get the list of available connections.
      Returns:
      a vector of connections instances.
    • getClientConnectionStatusListener

      ClientConnectionStatusListener getClientConnectionStatusListener()
      Get a listener to the status of the managed connections.
      Returns:
      a ClientConnectionStatusListener instance.
    • close

      void close()
      Close this job manager and all the resources it uses.
    • reset

      void reset()
      Reset this job manager.
    • cancelJob

      boolean cancelJob(String jobId) throws Exception
      Cancel the job with the specified id.
      Parameters:
      jobId - the id of the job to cancel.
      Returns:
      a true when cancel was successful false otherwise.
      Throws:
      Exception - if any error occurs.
    • getLoadBalancerSettings

      org.jppf.load.balancer.LoadBalancingInformation getLoadBalancerSettings()
      Get the current load-balancer settings.
      Returns:
      a LoadBalancingInformation instance, which encapsulates a load-balancing alfgorithm name, along with its parameters.
    • setLoadBalancerSettings

      void setLoadBalancerSettings(String algorithm, Properties parameters) throws Exception
      Change the load balancer settings for the client.
      Parameters:
      algorithm - the name of load-balancing alogrithm to use.
      parameters - the algorithm's parameters, if any. The parmeter names are assumed no to be prefixed.
      Throws:
      Exception - if any error occurs or if the algorithm name is null or not known.