Package org.apache.bookkeeper.bookie
Interface FileChannelProvider
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
DefaultFileChannelProvider
An interface of the FileChannelProvider.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose(BookieFileChannel bookieFileChannel) Close bookieFileChannel.static FileChannelProvidernewProvider(String providerClassName) default voidnotifyRename(File source, File target) Notify the rename source file name to the target file name operation.open(File file, ServerConfiguration configuration) Get the BookieFileChannel with the given file and configuration.default booleanWhether support reuse file.
-
Method Details
-
newProvider
- Parameters:
providerClassName- Provided class name for file channel.- Returns:
- FileChannelProvider. A file channel provider loaded from providerClassName
- Throws:
IOException- Possible IOException.
-
open
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
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
Notify the rename source file name to the target file name operation.- Parameters:
source-target-
-