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 |
---|---|
File |
getBootCounterFile() |
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 EngineBootsProvider
protected int getLastEngineBoots()
protected void setEngineBoots(int engineBoots)
public int getEngineBoots()
EngineBootsProvider
getEngineBoots
in interface EngineBootsProvider
public File getBootCounterFile()
Copyright © 2018 SNMP4J.org. All rights reserved.