Interface ExecutorChannel<T>

Type Parameters:
T - type of task bundle.
All Superinterfaces:
AutoCloseable

public interface ExecutorChannel<T> extends AutoCloseable
Execution context associated with a channel serving its state.
Author:
Martin JANDA
  • Method Details

    • getUuid

      String getUuid()
      Get the unique identifier of the client.
      Returns:
      the uuid as a string.
    • getConnectionUuid

      String getConnectionUuid()
      Get the unique ID for the connection.
      Returns:
      the connection id.
    • getBundler

      Bundler<?> getBundler()
      Get the bundler used to schedule tasks for the corresponding node.
      Returns:
      a Bundler instance.
    • checkBundler

      Bundler<?> checkBundler(JPPFBundlerFactory bundlerFactory, JPPFContext jppfContext)
      Check whether the bundler held by this context is up to date by comparison with the specified bundler.
      If it is not, then it is replaced with a copy of the specified bundler, with a timestamp taken at creation time.
      Parameters:
      bundlerFactory - the load-balancer factory.
      jppfContext - execution context.
      Returns:
      the (possibly new) bundle for this executor channel.
    • getSystemInformation

      JPPFSystemInformation getSystemInformation()
      Get the system information.
      Returns:
      a JPPFSystemInformation instance.
    • getManagementInfo

      JPPFManagementInfo getManagementInfo()
      Get the management information.
      Returns:
      a JPPFManagementInfo instance.
    • submit

      Future<?> submit(T bundle) throws Exception
      Submit bundle for execution on corresponding node.
      Parameters:
      bundle - the task bundle to submit.
      Returns:
      a JPPFFuture.
      Throws:
      Exception - if any error occurs.
    • isLocal

      boolean isLocal()
      Determine whether this channel is local (for an in-JVM node).
      Returns:
      true if the channel is local, false otherwise.
    • getExecutionStatus

      ExecutorStatus getExecutionStatus()
      Get the execution status of this channel.
      Returns:
      a ExecutorStatus enumerated value.
    • addExecutionStatusListener

      void addExecutionStatusListener(ExecutorChannelStatusListener listener)
      Add a execution status listener to this channel's list of listeners.
      Parameters:
      listener - the listener to add to the list.
    • removeExecutionStatusListener

      void removeExecutionStatusListener(ExecutorChannelStatusListener listener)
      Remove a execution status listener from this channel's list of listeners.
      Parameters:
      listener - the listener to remove from the list.
    • getMonitor

      Object getMonitor()
      Get the monitor object used for synchronization.
      Returns:
      an Object instance.
    • isActive

      boolean isActive()
      Determine whether this channel is active.
      Returns:
      true if the channel is active, false if it is inactive.
    • isAsynchronous

      default boolean isAsynchronous()
      Determine whether this channel is asynchronous, i.e. it can handle mmultiple jobs concurrently.
      Returns:
      true if the channel is asynchronous, false if it is synchronous.
    • getMaxJobs

      default int getMaxJobs()
      Get the maximum number of jobs that can be processed concurrently by this channel.
      Returns:
      the maximum number of jobs as an int value.
    • getCurrentNbJobs

      int getCurrentNbJobs()
      Get the number of jobs currently being processed by this channel.
      Returns:
      the current number of jobs as an int value.