Documentation of 'edu.rit.pj.cluster.JobBackendMessage' Java class
JobBackendMessage
edu.rit.pj.cluster

Class JobBackendMessage

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable


    public abstract class JobBackendMessage
    extends Message
    implements java.io.Externalizable
    Class JobBackendMessage provides a message sent to a Job Backend process (interface JobBackendRef) in the PJ cluster middleware.
    See Also:
    Serialized Form
    • Constructor Detail

      • JobBackendMessage

        public JobBackendMessage()
        Construct a new job backend message.
      • JobBackendMessage

        public JobBackendMessage(int theTag)
        Construct a new job backend message with the given message tag.
        Parameters:
        theTag - Message tag to use when sending this message.
    • Method Detail

      • cancelJob

        public static JobBackendMessage cancelJob(JobFrontendRef theJobFrontend,
                                                  java.lang.String errmsg)
        Construct a new "cancel job" message.
        Parameters:
        theJobFrontend - Job Frontend that is calling this method.
        errmsg - Error message string.
        Returns:
        "Cancel job" message.
      • commenceJob

        public static JobBackendMessage commenceJob(JobFrontendRef theJobFrontend,
                                                    java.net.InetSocketAddress[] middlewareAddress,
                                                    java.net.InetSocketAddress[] worldAddress,
                                                    java.net.InetSocketAddress[] frontendAddress,
                                                    java.util.Properties properties,
                                                    java.lang.String mainClassName,
                                                    java.lang.String[] args)
        Construct a new "commence job" message.
        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.
        Returns:
        "Commence job" message.
      • jobFinished

        public static JobBackendMessage jobFinished(JobFrontendRef theJobFrontend)
        Construct a new "job finished" message.
        Parameters:
        theJobFrontend - Job frontend that is calling this method.
        Returns:
        "Job finished" message.
      • renewLease

        public static JobBackendMessage renewLease(JobFrontendRef theJobFrontend)
        Construct a new "renew lease" message.
        Parameters:
        theJobFrontend - Job Frontend that is calling this method.
        Returns:
        "Renew lease" message.
      • reportResource

        public static JobBackendMessage reportResource(JobFrontendRef theJobFrontend,
                                                       java.lang.String resourceName,
                                                       byte[] content)
        Construct a new "report resource" message.
        Parameters:
        theJobFrontend - Job Frontend that is calling this method.
        resourceName - Resource name.
        content - Resource content, or null if resource not found.
        Returns:
        "Report resource" message.
      • reportResource

        public static JobBackendMessage reportResource(JobFrontendRef theJobFrontend,
                                                       java.lang.String resourceName,
                                                       ByteSequence content)
        Construct a new "report resource" message.
        Parameters:
        theJobFrontend - Job Frontend that is calling this method.
        resourceName - Resource name.
        content - Resource content, or null if resource not found.
        Returns:
        "Report resource" message.
      • outputFileOpenResult

        public static JobBackendMessage outputFileOpenResult(JobFrontendRef theJobFrontend,
                                                             int bfd,
                                                             int ffd,
                                                             java.io.IOException exc)
        Construct a new "output file open result" message.
        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.
        Returns:
        "Output file open result" message.
      • outputFileWriteResult

        public static JobBackendMessage outputFileWriteResult(JobFrontendRef theJobFrontend,
                                                              int ffd,
                                                              java.io.IOException exc)
        Construct a new "output file write result" message.
        Parameters:
        theJobFrontend - Job Frontend that is calling this method.
        ffd - Frontend file descriptor.
        exc - Null if success, exception if failure.
        Returns:
        "Output file write result" message.
      • outputFileFlushResult

        public static JobBackendMessage outputFileFlushResult(JobFrontendRef theJobFrontend,
                                                              int ffd,
                                                              java.io.IOException exc)
        Construct a new "output file flush result" message.
        Parameters:
        theJobFrontend - Job Frontend that is calling this method.
        ffd - Frontend file descriptor.
        exc - Null if success, exception if failure.
        Returns:
        "Output file flush result" message.
      • outputFileCloseResult

        public static JobBackendMessage outputFileCloseResult(JobFrontendRef theJobFrontend,
                                                              int ffd,
                                                              java.io.IOException exc)
        Construct a new "output file close result" message.
        Parameters:
        theJobFrontend - Job Frontend that is calling this method.
        ffd - Frontend file descriptor.
        exc - Null if success, exception if failure.
        Returns:
        "Output file close result" message.
      • inputFileOpenResult

        public static JobBackendMessage inputFileOpenResult(JobFrontendRef theJobFrontend,
                                                            int bfd,
                                                            int ffd,
                                                            java.io.IOException exc)
        Construct a new "input file open result" message.
        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.
        Returns:
        "Input file open result" message.
      • inputFileReadResult

        public static JobBackendMessage inputFileReadResult(JobFrontendRef theJobFrontend,
                                                            int ffd,
                                                            int len,
                                                            java.io.IOException exc)
        Construct a new "input file read result" message.
        Parameters:
        theJobFrontend - Job Frontend that is calling this method.
        ffd - Frontend file descriptor.
        len - Number of bytes read, or -1 if EOF.
        exc - Null if success, exception if failure.
        Returns:
        "Input file read result" message.
      • inputFileSkipResult

        public static JobBackendMessage inputFileSkipResult(JobFrontendRef theJobFrontend,
                                                            int ffd,
                                                            long len,
                                                            java.io.IOException exc)
        Construct a new "input file skip result" message.
        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.
        Returns:
        "Input file skip result" message.
      • inputFileCloseResult

        public static JobBackendMessage inputFileCloseResult(JobFrontendRef theJobFrontend,
                                                             int ffd,
                                                             java.io.IOException exc)
        Construct a new "input file close result" message.
        Parameters:
        theJobFrontend - Job Frontend that is calling this method.
        ffd - Frontend file descriptor.
        exc - Null if success, exception if failure.
        Returns:
        "Input file close result" message.
      • invoke

        public void invoke(JobBackendRef theJobBackend,
                           JobFrontendRef theJobFrontend)
                    throws java.io.IOException
        Invoke the method corresponding to this job backend message on the given Job Backend object. The method arguments come from the fields of this job backend message object.
        Parameters:
        theJobBackend - Job Backend on which to invoke the method.
        theJobFrontend - Job Frontend that is calling the method.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
      • writeExternal

        public void writeExternal(java.io.ObjectOutput out)
                           throws java.io.IOException
        Write this job backend message to the given object output stream.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Parameters:
        out - Object output stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
      • readExternal

        public void readExternal(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Read this job backend message from the given object input stream.
        Specified by:
        readExternal in interface java.io.Externalizable
        Parameters:
        in - Object input stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
        java.lang.ClassNotFoundException - Thrown if a class needed to read this job backend message could not be found.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.