Class DefaultFileChannelProvider

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, FileChannelProvider

    public class DefaultFileChannelProvider
    extends java.lang.Object
    implements FileChannelProvider
    A wrapper of FileChannel.
    • Constructor Detail

      • DefaultFileChannelProvider

        public DefaultFileChannelProvider()
    • Method Detail

      • open

        public BookieFileChannel open​(java.io.File file,
                                      ServerConfiguration configuration)
                               throws java.io.IOException
        Description copied from interface: FileChannelProvider
        Get the BookieFileChannel with the given file and configuration.
        Specified by:
        open in interface FileChannelProvider
        Parameters:
        file - File path related to bookie.
        configuration - Server configuration.
        Returns:
        BookieFileChannel related to file parameter.
        Throws:
        java.io.IOException - Possible IOException.
      • close

        public void close​(BookieFileChannel bookieFileChannel)
                   throws java.io.IOException
        Description copied from interface: FileChannelProvider
        Close bookieFileChannel.
        Specified by:
        close in interface FileChannelProvider
        Parameters:
        bookieFileChannel - The bookieFileChannel to be closed.
        Throws:
        java.io.IOException - Possible IOException.
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable