public class HandleLimitFS extends HandleTrackingFS
delegate, fileSystem, scheme
Constructor and Description |
---|
HandleLimitFS(FileSystem delegate,
int limit)
Create a new instance, limiting the maximum number
of open files to
limit |
Modifier and Type | Method and Description |
---|---|
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, newOutputStream
checkAccess, copy, createDirectory, createLink, createSymbolicLink, delete, deleteIfExists, getFileAttributeView, getFileStore, getFileSystem, getPath, getScheme, isHidden, isSameFile, move, newFileSystem, newFileSystem, onClose, readAttributes, readAttributes, readSymbolicLink, setAttribute, toDelegate, toString
installedProviders
public HandleLimitFS(FileSystem delegate, int limit)
limit
delegate
- delegate filesystem to wrap.limit
- maximum number of open files.protected void onOpen(Path path, Object stream) throws IOException
HandleTrackingFS
path
is opened via stream
.onOpen
in class HandleTrackingFS
path
- Path that was openedstream
- Stream or Channel opened against the path.IOException
- if an I/O error occurs.protected void onClose(Path path, Object stream) throws IOException
HandleTrackingFS
path
is closed via stream
.onClose
in class HandleTrackingFS
path
- Path that was closedstream
- Stream or Channel closed against the path.IOException
- if an I/O error occurs.Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.