Package com.illumon.iris.db.util.file
Interface FileHandleFactory
- All Known Implementing Classes:
TrackedFileHandleFactory
public interface FileHandleFactory
Factory interface for producing
FileHandle
s.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static final class
-
Method Summary
Modifier and TypeMethodDescriptionmakeHandle
(File file, OpenOption... openOptions) Create a newFileHandle
with the specified set ofOpenOption
s.toReadOnlyHandleCreator
(FileHandleFactory fileHandleFactory) toReadWriteCreateHandleCreator
(FileHandleFactory fileHandleFactory) toWriteAppendCreateHandleCreator
(FileHandleFactory fileHandleFactory) toWriteTruncateCreateHandleCreator
(FileHandleFactory fileHandleFactory)
-
Method Details
-
makeHandle
@NotNull FileHandle makeHandle(@NotNull File file, @NotNull OpenOption... openOptions) throws IOException Create a newFileHandle
with the specified set ofOpenOption
s.- Parameters:
file
- TheFile
to openopenOptions
- TheOpenOption
s to use- Returns:
- The new file handle
- Throws:
IOException
-
toReadOnlyHandleCreator
static FileHandleFactory.FileToHandleFunction toReadOnlyHandleCreator(@NotNull FileHandleFactory fileHandleFactory) -
toReadWriteCreateHandleCreator
static FileHandleFactory.FileToHandleFunction toReadWriteCreateHandleCreator(@NotNull FileHandleFactory fileHandleFactory) -
toWriteAppendCreateHandleCreator
static FileHandleFactory.FileToHandleFunction toWriteAppendCreateHandleCreator(@NotNull FileHandleFactory fileHandleFactory) -
toWriteTruncateCreateHandleCreator
static FileHandleFactory.FileToHandleFunction toWriteTruncateCreateHandleCreator(@NotNull FileHandleFactory fileHandleFactory)
-