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 void
close()
void
close(BookieFileChannel bookieFileChannel)
Close bookieFileChannel.BookieFileChannel
open(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:FileChannelProvider
Get the BookieFileChannel with the given file and configuration.- Specified by:
open
in 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:FileChannelProvider
Close bookieFileChannel.- Specified by:
close
in interfaceFileChannelProvider
- Parameters:
bookieFileChannel
- The bookieFileChannel to be closed.- Throws:
java.io.IOException
- Possible IOException.
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-