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

Class BackendFileReader



  • public class BackendFileReader
    extends java.lang.Object
    Class BackendFileReader provides an object that reads sequential files in the job backend process.

    Note: Class BackendFileReader is not multiple thread safe; it assumes it is being called by a synchronized method in the job backend.

    • Field Detail

    • Constructor Detail

      • BackendFileReader

        public BackendFileReader(JobFrontendRef theJobFrontend,
                                 JobBackendRef theJobBackend)
        Construct a new backend file reader.
        Parameters:
        theJobFrontend - Job Frontend.
        theJobBackend - Job Backend.
    • Method Detail

      • open

        public BackendFileInputStream open(java.io.File file)
                                    throws java.io.IOException
        Open a backend file input stream on the given file.
        Parameters:
        file - File.
        Returns:
        Backend file input stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
      • inputFileOpenResult

        public void inputFileOpenResult(JobFrontendRef theJobFrontend,
                                        int bfd,
                                        int ffd,
                                        java.io.IOException exc)
        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.
      • inputFileReadResult

        public void inputFileReadResult(JobFrontendRef theJobFrontend,
                                        int ffd,
                                        int len,
                                        java.io.IOException exc)
        Report the result of reading the given input file.
        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.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
      • inputFileSkipResult

        public void inputFileSkipResult(JobFrontendRef theJobFrontend,
                                        int ffd,
                                        long len,
                                        java.io.IOException exc)
        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:
        java.io.IOException - Thrown if an I/O error occurred.
      • inputFileCloseResult

        public void inputFileCloseResult(JobFrontendRef theJobFrontend,
                                         int ffd,
                                         java.io.IOException exc)
        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:
        java.io.IOException - Thrown if an I/O error occurred.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.