Interface FileChannelProvider

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
DefaultFileChannelProvider

public interface FileChannelProvider extends Closeable
An interface of the FileChannelProvider.
  • Method Details

    • newProvider

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

      BookieFileChannel open(File file, ServerConfiguration configuration) throws 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:
      IOException - Possible IOException.
    • close

      void close(BookieFileChannel bookieFileChannel) throws IOException
      Close bookieFileChannel.
      Parameters:
      bookieFileChannel - The bookieFileChannel to be closed.
      Throws:
      IOException - Possible IOException.
    • supportReuseFile

      default boolean supportReuseFile()
      Whether support reuse file. Default is false.
      Returns:
    • notifyRename

      default void notifyRename(File source, File target)
      Notify the rename source file name to the target file name operation.
      Parameters:
      source -
      target -