@ThreadSafe public final class FsStatistics extends Object
| Modifier and Type | Class and Description |
|---|---|
private class |
FsStatistics.CountingInputStream |
private class |
FsStatistics.CountingOutputStream |
private class |
FsStatistics.CountingReadOnlyFile |
| Modifier and Type | Field and Description |
|---|---|
private FsStatisticsManager |
manager |
private long |
read |
private long |
written |
| Constructor and Description |
|---|
FsStatistics(FsStatisticsManager manager) |
| Modifier and Type | Method and Description |
|---|---|
(package private) InputStream |
countBytes(InputStream in) |
(package private) OutputStream |
countBytes(OutputStream out) |
(package private) ReadOnlyFile |
countBytes(ReadOnlyFile rof) |
int |
getFileSystemsTotal()
Returns the total number of managed federated file systems.
|
int |
getFileSystemsTouched()
Returns the number of managed federated file systems which have been
touched and need synchronization by calling
FsStatisticsManager.sync(de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsSyncOption>, de.schlichtherle.truezip.util.ExceptionHandler<? super java.io.IOException, X>). |
int |
getTopLevelFileSystemsTotal()
Returns the total number of managed top level federated file
systems.
|
int |
getTopLevelFileSystemsTouched()
Returns the number of managed top level federated file systems
which have been touched and need synchronization by calling
FsStatisticsManager.sync(de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsSyncOption>, de.schlichtherle.truezip.util.ExceptionHandler<? super java.io.IOException, X>). |
long |
getTopLevelRead()
Returns the total number of bytes read from all managed
top level federated file systems, i.e. all managed federated
file systems which have a parent file system which is not a member of
another parent file system.
|
long |
getTopLevelWritten()
Returns the total number of bytes written to all managed
top level federated file systems, i.e. all managed federated
file systems which have a parent file system which is not a member of
another parent file system.
|
boolean |
isClosed()
Returns
true iff this statistics instance has been closed and
should not receive any more updates. |
private final FsStatisticsManager manager
private volatile long read
private volatile long written
FsStatistics(FsStatisticsManager manager)
public int getFileSystemsTotal()
public int getFileSystemsTouched()
FsStatisticsManager.sync(de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsSyncOption>, de.schlichtherle.truezip.util.ExceptionHandler<? super java.io.IOException, X>).
Note that you should not use the returned value to synchronize conditionally - this is unreliable!
public int getTopLevelFileSystemsTotal()
public int getTopLevelFileSystemsTouched()
FsStatisticsManager.sync(de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsSyncOption>, de.schlichtherle.truezip.util.ExceptionHandler<? super java.io.IOException, X>).ReadOnlyFile countBytes(ReadOnlyFile rof)
InputStream countBytes(InputStream in)
public long getTopLevelRead()
This method is intended to be used to monitor the progress of the
method FsStatisticsManager.sync(de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsSyncOption>, de.schlichtherle.truezip.util.ExceptionHandler<? super java.io.IOException, X>).
OutputStream countBytes(OutputStream out)
public long getTopLevelWritten()
This method is intended to be used to monitor the progress of the
method FsStatisticsManager.sync(de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsSyncOption>, de.schlichtherle.truezip.util.ExceptionHandler<? super java.io.IOException, X>).
public boolean isClosed()
true iff this statistics instance has been closed and
should not receive any more updates.true iff this statistics instance has been closed and
should not receive any more updates.Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.