Module org.snmp4j

Class EngineBootsCounterFile

    • 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()
      • getEngineId

        public OctetString getEngineId​(OctetString defaultEngineID)
        Description copied from interface: EngineIdProvider
        Gets the engine ID for the SNMP entity associated with this EngineIdProvider.
        Specified by:
        getEngineId in interface EngineIdProvider
        Parameters:
        defaultEngineID - the engine ID for this entity, if there is no persistently saved engine ID yet.
        Returns:
        the persistently saved engine ID or the reference to the defaultEngineID which is then persistently stored.
      • resetEngineId

        public void resetEngineId​(OctetString engineId)
        Description copied from interface: EngineIdProvider
        Sets the persistently stored engine ID to a new value.
        Specified by:
        resetEngineId in interface EngineIdProvider
        Parameters:
        engineId - the new engine ID for this SNMP entity.