Interface JobBackendRef

All Known Implementing Classes:
JobBackend, JobBackendProxy

public interface JobBackendRef
Interface JobBackendRef specifies the interface for the PJ job backend process.
Version:
05-Nov-2006
Author:
Alan Kaminsky
  • Method Details

    • cancelJob

      void cancelJob(JobFrontendRef theJobFrontend, String errmsg) throws IOException
      Cancel the job.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      errmsg - Error message string.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • commenceJob

      void commenceJob(JobFrontendRef theJobFrontend, InetSocketAddress[] middlewareAddress, InetSocketAddress[] worldAddress, InetSocketAddress[] frontendAddress, Properties properties, String mainClassName, String[] args) throws IOException
      Commence the job.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      middlewareAddress - Array of hosts/ports for middleware messages. The first K elements are for the job backend processes in rank order, the K+1st element is for the job frontend process. If the
      worldAddress - Array of hosts/ports for the world communicator. The K elements are for the job backend processes in rank order.
      frontendAddress - Array of hosts/ports for the frontend communicator. The first K elements are for the job backend processes in rank order, the K+1st element is for the job frontend process. If the frontend communicator does not exist, frontendAddress is null.
      properties - Java system properties.
      mainClassName - Fully qualified class name of the Java main program class to execute.
      args - Array of 0 or more Java command line arguments.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • jobFinished

      void jobFinished(JobFrontendRef theJobFrontend) throws IOException
      Report that the job finished.
      Parameters:
      theJobFrontend - Job frontend that is calling this method.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • renewLease

      void renewLease(JobFrontendRef theJobFrontend) throws IOException
      Renew the lease on the job.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • reportResource

      void reportResource(JobFrontendRef theJobFrontend, String resourceName, byte[] content) throws IOException
      Report the content for a previously-requested resource.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      resourceName - Resource name.
      content - Resource content, or null if resource not found.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • reportResource

      void reportResource(JobFrontendRef theJobFrontend, String resourceName, ByteSequence content) throws IOException
      Report the content for a previously-requested resource.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      resourceName - Resource name.
      content - Resource content, or null if resource not found.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • outputFileOpenResult

      void outputFileOpenResult(JobFrontendRef theJobFrontend, int bfd, int ffd, IOException exc) throws IOException
      Report the result of opening the given output file.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      bfd - Backend file descriptor.
      ffd - Frontend file descriptor if success.
      exc - Null if success, exception if failure.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • outputFileWriteResult

      void outputFileWriteResult(JobFrontendRef theJobFrontend, int ffd, IOException exc) throws IOException
      Report the result of writing the given output file.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      ffd - Frontend file descriptor.
      exc - Null if success, exception if failure.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • outputFileFlushResult

      void outputFileFlushResult(JobFrontendRef theJobFrontend, int ffd, IOException exc) throws IOException
      Report the result of flushing the given output file.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      ffd - Frontend file descriptor.
      exc - Null if success, exception if failure.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • outputFileCloseResult

      void outputFileCloseResult(JobFrontendRef theJobFrontend, int ffd, IOException exc) throws IOException
      Report the result of closing the given output file.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      ffd - Frontend file descriptor.
      exc - Null if success, exception if failure.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • inputFileOpenResult

      void inputFileOpenResult(JobFrontendRef theJobFrontend, int bfd, int ffd, IOException exc) throws IOException
      Report the result of opening the given input file.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      bfd - Backend file descriptor.
      ffd - Frontend file descriptor if success.
      exc - Null if success, exception if failure.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • inputFileReadResult

      void inputFileReadResult(JobFrontendRef theJobFrontend, int ffd, byte[] buf, int len, IOException exc) throws IOException
      Report the result of reading the given input file.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      ffd - Frontend file descriptor.
      buf - Bytes read.
      len - Number of bytes read, or -1 if EOF.
      exc - Null if success, exception if failure.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • inputFileSkipResult

      void inputFileSkipResult(JobFrontendRef theJobFrontend, int ffd, long len, IOException exc) throws IOException
      Report the result of skipping the given input file.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      ffd - Frontend file descriptor.
      len - Number of bytes skipped.
      exc - Null if success, exception if failure.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • inputFileCloseResult

      void inputFileCloseResult(JobFrontendRef theJobFrontend, int ffd, IOException exc) throws IOException
      Report the result of closing the given input file.
      Parameters:
      theJobFrontend - Job Frontend that is calling this method.
      ffd - Frontend file descriptor.
      exc - Null if success, exception if failure.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • close

      void close()
      Close communication with this Job Backend.