Class EngineBootsCounterFile

    • Constructor Summary

      Constructors 
      Constructor Description
      EngineBootsCounterFile​(java.io.File bootCounterFile)
      Creates the boot counter by using the specified file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EngineBootsCounterFile

        public EngineBootsCounterFile​(java.io.File bootCounterFile)
        Creates the boot counter by using the specified file.
        Parameters:
        bootCounterFile - a file (does not have to exists yet but must be writable).
    • Method Detail

      • updateEngineBoots

        public int updateEngineBoots()
        Returns the current engine boot counter value incremented by one.
        Specified by:
        updateEngineBoots in interface EngineBootsProvider
        Returns:
        the last engine boots counter incremented by one.
      • getLastEngineBoots

        protected int getLastEngineBoots()
        Reads the engine boots counter from the corresponding input stream (file).
        Returns:
        the boots counter value read or zero if it could not be read.
      • setEngineBoots

        protected void setEngineBoots​(int engineBoots)
      • getBootCounterFile

        public java.io.File getBootCounterFile()