Class StorageType

    • Constructor Detail

      • StorageType

        public StorageType​(int columnID,
                           MOAccess access,
                           org.snmp4j.smi.Integer32 defaultValue,
                           boolean mutableInService)
      • StorageType

        public StorageType​(int columnID,
                           MOAccess access,
                           org.snmp4j.smi.Integer32 defaultValue)
    • Method Detail

      • validate

        public int validate​(org.snmp4j.smi.Variable newValue,
                            org.snmp4j.smi.Variable oldValue)
        Overrides:
        validate in class MOMutableColumn
      • prepareRow

        public void prepareRow​(SubRequest subRequest,
                               MOMutableTableRow currentRow,
                               MOTableRow changeSet)
        Prepares a row for changes described by the supplied change set. If the modification cannot be successfully prepared, the error status of the supplied subRequest should be set to the appropriate error status value.

        This method is called only once per modified row.

        Specified by:
        prepareRow in interface RowModificationControlColumn
        Parameters:
        subRequest - the sub-request that triggered the row change and that can be used to deny the commit phase by setting its error status.
        currentRow - the current row (yet unmodified).
        changeSet - a MOTableRow instance that represents the state of the row if all changes have been applied successfully.
      • isVolatile

        public boolean isVolatile​(MOTableRow row,
                                  int column)
        Checks if the row is volatile (i.e. must not be stored in stable storage) or not. Note: In SNMP4J-Agent before 3.0, this method returned also true for rows with storage type readOnly which did not follow the SMI definition of StorageType. See also ImportMode for details about restore data from stable storage.
        Overrides:
        isVolatile in class MOColumn
        Parameters:
        row - a row of the table where this column is part of.
        column - the column index of this column in row.
        Returns:
        true if the storage type of this row is other or volatile_.