Interface FileChannelProvider

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    DefaultFileChannelProvider

    public interface FileChannelProvider
    extends java.io.Closeable
    An interface of the FileChannelProvider.
    • Method Detail

      • newProvider

        static FileChannelProvider newProvider​(java.lang.String providerClassName)
                                        throws java.io.IOException
        Parameters:
        providerClassName - Provided class name for file channel.
        Returns:
        FileChannelProvider. A file channel provider loaded from providerClassName
        Throws:
        java.io.IOException - Possible IOException.
      • open

        BookieFileChannel open​(java.io.File file,
                               ServerConfiguration configuration)
                        throws java.io.IOException
        Get the BookieFileChannel with the given file and configuration.
        Parameters:
        file - File path related to bookie.
        configuration - Server configuration.
        Returns:
        BookieFileChannel related to file parameter.
        Throws:
        java.io.IOException - Possible IOException.
      • close

        void close​(BookieFileChannel bookieFileChannel)
            throws java.io.IOException
        Close bookieFileChannel.
        Parameters:
        bookieFileChannel - The bookieFileChannel to be closed.
        Throws:
        java.io.IOException - Possible IOException.