| Constructor and Description |
|---|
Compression() |
| Modifier and Type | Method and Description |
|---|---|
protected long |
beginProcessing()
Record the start time every time engine processing begins.
|
protected void |
endProcessing(long beginTime,
long in,
long out)
Record the processing time and input/ouput bytes time every time engine
processing ends.
|
abstract java.lang.String |
name()
Get the compression name.
|
long |
processingTime()
Get the time (in milliseconds) spent in this engine since it's creation
respectively the last call to reset().
|
long |
rateIn()
Get the input processing rate (in bytes per second) of this engine based
upon the consumed bytes totalIn() and the processing time
processingTime().
|
long |
rateOut()
Get the output processing rate (in bytes per second) of this engine based
upon the emitted bytes totalOut() and the processing time
processingTime().
|
void |
reset()
Reset the compression engine to it's initial state.
|
long |
totalIn()
Get the number of bytes consumed by this engine since it's creation
respectively the last call to reset().
|
long |
totalOut()
Get the number of bytes emitted by this engine since it's creation
respectively the last call to reset().
|
public abstract java.lang.String name()
public void reset()
public final long processingTime()
public final long totalIn()
public final long rateIn()
public final long totalOut()
public final long rateOut()
protected final long beginProcessing()
Derived class have to call this function to make sure engine statistics are properly tracked.
protected final void endProcessing(long beginTime,
long in,
long out)
Derived class have to call this function to make sure engine statistics are properly tracked.
beginTime - The begin time as returned by
beginProcessing().in - The number of consumed bytes.out - The number of emitted bytes.