de.schlichtherle.truezip.fs
Class FsStatisticsManager
java.lang.Object
de.schlichtherle.truezip.fs.FsManager
de.schlichtherle.truezip.fs.FsDecoratingManager<FsManager>
de.schlichtherle.truezip.fs.FsStatisticsManager
- All Implemented Interfaces:
- Iterable<FsController<?>>
@ThreadSafe
public final class FsStatisticsManager
- extends FsDecoratingManager<FsManager>
Provides statistics for the federated file systems managed by the decorated
file system manager.
- Author:
- Christian Schlichtherle
statistics
private volatile FsStatistics statistics
FsStatisticsManager
public FsStatisticsManager(@NonNull
FsManager manager)
- Constructs a new statistics file system manager.
- Parameters:
manager - the decorated file system manager.
getController
public FsController<?> getController(FsMountPoint mountPoint,
FsCompositeDriver driver)
- Description copied from class:
FsManager
- Returns a thread-safe file system controller for the given mount point.
If and only if the given mount point addresses a federated file system,
the returned file system controller is remembered for life cycle
management, i.e. future lookup and
synchronization
operations.
- Overrides:
getController in class FsDecoratingManager<FsManager>
- Parameters:
mountPoint - the mount point of the file system.driver - the file system composite driver which will be used to
create a new file system controller if required.
- Returns:
- A file system controller.
getStatistics
@NonNull
public FsStatistics getStatistics()
- Returns statistics about the set of federated file systems managed by
the decorated file system manager.
The statistics provided by the returned object get asynchronously
updated up to the next call to
sync(de.schlichtherle.truezip.util.BitField, de.schlichtherle.truezip.util.ExceptionHandler super java.io.IOException, X>).
Note that there may be a slight delay until the values returned reflect
the actual state of this package.
This delay increases if the system is under heavy load.
- See Also:
sync(de.schlichtherle.truezip.util.BitField, de.schlichtherle.truezip.util.ExceptionHandler super java.io.IOException, X>),
FsStatistics.isClosed()
sync
public <X extends IOException> void sync(BitField<FsSyncOption> options,
ExceptionHandler<? super IOException,X> handler)
throws X extends IOException
- Commits all unsynchronized changes to the contents of all federated file
systems managed by this instance to their respective parent file system.
This will reset the state of the respective file system controllers.
After the synchronization, this implementation creates a new statistics
object to be returned by a subsequent call to getStatistics().
- Overrides:
sync in class FsDecoratingManager<FsManager>
- Type Parameters:
X - the type of the IOException to throw at the
discretion of the exception handler.- Parameters:
options - the synchronization options.handler - the exception handling strategy for dealing with one or
more input SyncExceptions which may trigger an X.
- Throws:
X extends IOException
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.