Package org.apache.bookkeeper.bookie
Class DefaultFileChannelProvider
java.lang.Object
org.apache.bookkeeper.bookie.DefaultFileChannelProvider
- All Implemented Interfaces:
Closeable,AutoCloseable,FileChannelProvider
A wrapper of FileChannel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidclose(BookieFileChannel bookieFileChannel) Close bookieFileChannel.open(File file, ServerConfiguration configuration) Get the BookieFileChannel with the given file and configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.bookkeeper.bookie.FileChannelProvider
notifyRename, supportReuseFile
-
Constructor Details
-
DefaultFileChannelProvider
public DefaultFileChannelProvider()
-
-
Method Details
-
open
Description copied from interface:FileChannelProviderGet the BookieFileChannel with the given file and configuration.- Specified by:
openin interfaceFileChannelProvider- Parameters:
file- File path related to bookie.configuration- Server configuration.- Returns:
- BookieFileChannel related to file parameter.
- Throws:
IOException- Possible IOException.
-
close
Description copied from interface:FileChannelProviderClose bookieFileChannel.- Specified by:
closein interfaceFileChannelProvider- Parameters:
bookieFileChannel- The bookieFileChannel to be closed.- Throws:
IOException- Possible IOException.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-