public class LeakFS extends HandleTrackingFS
When FileSystem.close() is called, this class will throw
an exception if any file handles are still open.
delegate, fileSystem, scheme| Constructor and Description |
|---|
LeakFS(FileSystem delegate)
Create a new instance, tracking file handle leaks for the
specified delegate filesystem.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onClose()
Override to trigger some behavior when the filesystem is closed.
|
protected void |
onClose(Path path,
Object stream)
Called when
path is closed via stream. |
protected void |
onOpen(Path path,
Object stream)
Called when
path is opened via stream. |
newAsynchronousFileChannel, newByteChannel, newDirectoryStream, newFileChannel, newInputStream, newOutputStreamcheckAccess, copy, createDirectory, createLink, createSymbolicLink, delete, deleteIfExists, getFileAttributeView, getFileStore, getFileSystem, getPath, getScheme, isHidden, isSameFile, move, newFileSystem, newFileSystem, readAttributes, readAttributes, readSymbolicLink, setAttribute, toDelegate, toStringinstalledProviderspublic LeakFS(FileSystem delegate)
delegate - delegate filesystem to wrap.protected void onOpen(Path path, Object stream)
HandleTrackingFSpath is opened via stream.onOpen in class HandleTrackingFSpath - Path that was openedstream - Stream or Channel opened against the path.protected void onClose(Path path, Object stream)
HandleTrackingFSpath is closed via stream.onClose in class HandleTrackingFSpath - Path that was closedstream - Stream or Channel closed against the path.public void onClose()
FilterFileSystemProviderThis is always called for each FilterFileSystemProvider in the chain.
onClose in class FilterFileSystemProviderCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.