public class EngineBootsCounterFile extends Object implements EngineBootsProvider
EngineBootsCounterFile is a EngineBootsProvider
that stores the boot counter in a file.| Constructor and Description |
|---|
EngineBootsCounterFile(File bootCounterFile)
Creates the boot counter by using the specified file.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getEngineBoots()
Returns current engine boot counter value.
|
protected int |
getLastEngineBoots()
Reads the engine boots counter from the corresponding input stream (file).
|
protected void |
setEngineBoots(int engineBoots) |
int |
updateEngineBoots()
Returns the current engine boot counter value incremented by one.
|
public EngineBootsCounterFile(File bootCounterFile)
bootCounterFile - a file (does not have to exists yet but must be writable).public int updateEngineBoots()
updateEngineBoots in interface EngineBootsProviderprotected int getLastEngineBoots()
protected void setEngineBoots(int engineBoots)
public int getEngineBoots()
EngineBootsProvidergetEngineBoots in interface EngineBootsProviderCopyright © 2015 SNMP4J.org. All rights reserved.