Package org.apache.bookkeeper.bookie
Class DefaultFileChannel
java.lang.Object
org.apache.bookkeeper.bookie.DefaultFileChannel
- All Implemented Interfaces:
BookieFileChannel
Default FileChannel for bookie to read and write.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close file channel and release all resources.booleanfileExists(File file) Check the given file if exists.getFD()Get the file descriptor of the opened file.An interface for get the FileChannel from the provider.
-
Constructor Details
-
DefaultFileChannel
DefaultFileChannel(File file, ServerConfiguration serverConfiguration) throws IOException - Throws:
IOException
-
-
Method Details
-
getFileChannel
Description copied from interface:BookieFileChannelAn interface for get the FileChannel from the provider.- Specified by:
getFileChannelin interfaceBookieFileChannel- Returns:
- Throws:
FileNotFoundException
-
fileExists
Description copied from interface:BookieFileChannelCheck the given file if exists.- Specified by:
fileExistsin interfaceBookieFileChannel- Returns:
-
getFD
Description copied from interface:BookieFileChannelGet the file descriptor of the opened file.- Specified by:
getFDin interfaceBookieFileChannel- Returns:
- Throws:
IOException
-
close
Description copied from interface:BookieFileChannelClose file channel and release all resources.- Specified by:
closein interfaceBookieFileChannel- Throws:
IOException
-