Package org.apache.bookkeeper.bookie
Class DefaultFileChannelProvider
- java.lang.Object
-
- org.apache.bookkeeper.bookie.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 Summary
Constructors Constructor Description DefaultFileChannelProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidclose(BookieFileChannel bookieFileChannel)Close bookieFileChannel.BookieFileChannelopen(java.io.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, wait
-
Methods inherited from interface org.apache.bookkeeper.bookie.FileChannelProvider
notifyRename, supportReuseFile
-
-
-
-
Method Detail
-
open
public BookieFileChannel open(java.io.File file, ServerConfiguration configuration) throws java.io.IOException
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:
java.io.IOException- Possible IOException.
-
close
public void close(BookieFileChannel bookieFileChannel) throws java.io.IOException
Description copied from interface:FileChannelProviderClose bookieFileChannel.- Specified by:
closein interfaceFileChannelProvider- Parameters:
bookieFileChannel- The bookieFileChannel to be closed.- Throws:
java.io.IOException- Possible IOException.
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-