Interface BookieFileChannel

  • All Known Implementing Classes:
    DefaultFileChannel

    public interface BookieFileChannel
    A FileChannel for the JournalChannel read and write, we can use this interface to extend the FileChannel which we use in the JournalChannel.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Close file channel and release all resources.
      boolean fileExists​(java.io.File file)
      Check the given file if exists.
      java.io.FileDescriptor getFD()
      Get the file descriptor of the opened file.
      java.nio.channels.FileChannel getFileChannel()
      An interface for get the FileChannel from the provider.
    • Method Detail

      • getFileChannel

        java.nio.channels.FileChannel getFileChannel()
                                              throws java.io.FileNotFoundException,
                                                     java.io.IOException
        An interface for get the FileChannel from the provider.
        Returns:
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
      • fileExists

        boolean fileExists​(java.io.File file)
        Check the given file if exists.
        Parameters:
        file -
        Returns:
      • getFD

        java.io.FileDescriptor getFD()
                              throws java.io.IOException
        Get the file descriptor of the opened file.
        Returns:
        Throws:
        java.io.IOException
      • close

        void close()
            throws java.io.IOException
        Close file channel and release all resources.
        Throws:
        java.io.IOException