public class ReadOnlyThroughputTracker extends ThroughputTracker
Constructor and Description |
---|
ReadOnlyThroughputTracker(ThroughputTracker tt)
Create a read-only throughput tracker backed by the another throughput
tracker.
|
Modifier and Type | Method and Description |
---|---|
void |
add(long count)
Disabled add operation.
|
double |
duration()
Number of seconds elapsed since the tracker was last reset.
|
void |
freeze()
Disabled freeze operation.
|
void |
reset()
Disabled reset operation.
|
double |
throughput()
Get the number of entities transferred per second.
|
long |
total()
Get the number of entities accumulated by the tracker.
|
public ReadOnlyThroughputTracker(ThroughputTracker tt)
tt
- backing tracker to be made read-onlypublic void reset()
reset
in class ThroughputTracker
UnsupportedOperationException
- if attempted on read-only trackerpublic void freeze()
freeze
in class ThroughputTracker
UnsupportedOperationException
- if attempted on read-only trackerpublic void add(long count)
add
in class ThroughputTracker
count
- number of entities to consider as transferedUnsupportedOperationException
- if attempted on read-only trackerpublic double throughput()
ThroughputTracker
throughput
in class ThroughputTracker
public long total()
ThroughputTracker
total
in class ThroughputTracker
public double duration()
ThroughputTracker
duration
in class ThroughputTracker
Copyright © 2015. All Rights Reserved.