Package org.apache.bookkeeper.bookie
Interface BookieFileChannel
-
- All Known Implementing Classes:
DefaultFileChannel
public interface BookieFileChannelA FileChannel for the JournalChannel read and write, we can use this interface to extend the FileChannel which we use in the JournalChannel.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close file channel and release all resources.booleanfileExists(java.io.File file)Check the given file if exists.java.io.FileDescriptorgetFD()Get the file descriptor of the opened file.java.nio.channels.FileChannelgetFileChannel()An interface for get the FileChannel from the provider.
-
-
-
Method Detail
-
getFileChannel
java.nio.channels.FileChannel getFileChannel() throws java.io.FileNotFoundException, java.io.IOExceptionAn interface for get the FileChannel from the provider.- Returns:
- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
fileExists
boolean fileExists(java.io.File file)
Check the given file if exists.- Parameters:
file-- Returns:
-
getFD
java.io.FileDescriptor getFD() throws java.io.IOExceptionGet the file descriptor of the opened file.- Returns:
- Throws:
java.io.IOException
-
close
void close() throws java.io.IOExceptionClose file channel and release all resources.- Throws:
java.io.IOException
-
-