EngineBootsProvider
public class EngineBootsCounterFile extends java.lang.Object implements EngineBootsProvider
EngineBootsCounterFile
is a EngineBootsProvider
that stores the boot counter in a file.Constructor | Description |
---|---|
EngineBootsCounterFile(java.io.File bootCounterFile) |
Creates the boot counter by using the specified file.
|
Modifier and Type | Method | Description |
---|---|---|
java.io.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(java.io.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 java.io.File getBootCounterFile()
Copyright © 2018 SNMP4J.org. All rights reserved.