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

Class BackendFileWriter



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

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

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      java.io.PrintStream err
      Print stream for printing on the job frontend's standard error.
      java.io.PrintStream out
      Print stream for printing on the job frontend's standard output.
    • Field Detail

      • out

        public final java.io.PrintStream out
        Print stream for printing on the job frontend's standard output.
      • err

        public final java.io.PrintStream err
        Print stream for printing on the job frontend's standard error.
    • Constructor Detail

      • BackendFileWriter

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

      • open

        public BackendFileOutputStream open(java.io.File file,
                                            boolean append)
                                     throws java.io.IOException
        Open a backend file output stream on the given file.
        Parameters:
        file - File.
        append - True to append, false to overwrite.
        Returns:
        Backend file output stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
      • outputFileOpenResult

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

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

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

        public void outputFileCloseResult(JobFrontendRef theJobFrontend,
                                          int ffd,
                                          java.io.IOException exc)
        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:
        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.