Class EngineBootsCounterFile

    • Constructor Detail

      • EngineBootsCounterFile

        public EngineBootsCounterFile​(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 File getBootCounterFile​()