Package io.deephaven.engine.util.file
Class FileHandleAccessor
java.lang.Object
io.deephaven.engine.util.file.FileHandleAccessor
- Direct Known Subclasses:
TrackedSeekableByteChannel
Base class for accessors that wrap a
FileHandle
with support for interruption and asynchronous close.-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
FileHandleAccessor
(FileHandleFactory.FileToHandleFunction fileHandleCreator, @NotNull File file) Create an accessor that gets handles forfile
fromfileHandleCreator
. -
Method Summary
Modifier and TypeMethodDescriptionprotected final FileHandle
refreshFileHandle
(FileHandle previousLocalHandle) Replace the file handle with a new one if the closed handle passed in is still current, and return the (possibly changed) current value.final String
toString()
-
Field Details
-
file
-
fileHandle
-
-
Constructor Details
-
FileHandleAccessor
protected FileHandleAccessor(@NotNull FileHandleFactory.FileToHandleFunction fileHandleCreator, @NotNull @NotNull File file) Create an accessor that gets handles forfile
fromfileHandleCreator
.- Parameters:
fileHandleCreator
- The function used to make file handlesfile
- The abstract path name to access
-
-
Method Details
-
refreshFileHandle
Replace the file handle with a new one if the closed handle passed in is still current, and return the (possibly changed) current value.- Parameters:
previousLocalHandle
- The closed handle that calling code would like to replace- Returns:
- The current file handle, possibly newly created
-
toString
-