- java.lang.Object
-
- org.snmp4j.agent.mo.MOColumn<V>
-
- org.snmp4j.agent.mo.MOMutableColumn<org.snmp4j.smi.Integer32>
-
- org.snmp4j.agent.mo.snmp.StorageType
-
- All Implemented Interfaces:
Comparable<MOColumn<org.snmp4j.smi.Integer32>>,RowModificationControlColumn
public class StorageType extends MOMutableColumn<org.snmp4j.smi.Integer32> implements RowModificationControlColumn
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStorageType.StorageTypeEnumTheStorageTypeEnumas a enumerated representastion of the StorageType SMI values.
-
Field Summary
Fields Modifier and Type Field Description static intnonVolatilestatic intotherstatic intpermanentstatic intreadOnlystatic intvolatile_
-
Constructor Summary
Constructors Constructor Description StorageType(int columnID, MOAccess access, org.snmp4j.smi.Integer32 defaultValue)StorageType(int columnID, MOAccess access, org.snmp4j.smi.Integer32 defaultValue, boolean mutableInService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.snmp4j.smi.Integer32getStorageType(MOTableRow row, MOTable<?,?,?> table)Gets the value of the StorageType column (if it exists) in the specified row and table.booleanisVolatile(MOTableRow row, int column)Checks if the row is volatile (i.e.voidprepareRow(SubRequest<?> subRequest, MOMutableTableRow currentRow, MOTableRow changeSet)Prepares a row for changes described by the supplied change set.intvalidate(org.snmp4j.smi.Integer32 newValue, org.snmp4j.smi.Integer32 oldValue)-
Methods inherited from class org.snmp4j.agent.mo.MOColumn
compareTo, get, getAccess, getColumnID, getRestoreValue, getStoreValue, getSyntax, getTable, getValue, setAccess, setColumnID, setSyntax, setTable
-
Methods inherited from class org.snmp4j.agent.mo.MOMutableColumn
addMOValueValidationListener, cleanup, commit, getDefaultValue, isMandatory, isMutableInService, prepare, removeMOValueValidationListener, setDefaultValue, setMandatory, setMutableInService, toString, undo, validateSetRequest
-
-
-
-
Field Detail
-
other
public static final int other
- See Also:
- Constant Field Values
-
volatile_
public static final int volatile_
- See Also:
- Constant Field Values
-
nonVolatile
public static final int nonVolatile
- See Also:
- Constant Field Values
-
permanent
public static final int permanent
- See Also:
- Constant Field Values
-
readOnly
public static final int readOnly
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStorageType
public static org.snmp4j.smi.Integer32 getStorageType(MOTableRow row, MOTable<?,?,?> table)
Gets the value of the StorageType column (if it exists) in the specified row and table. It starts searching for theStorageTypecolumn from the last column and then proceeds down to the first until it finds it. If noStorageTypecolumn can be found,nullis returned.- Parameters:
row- a row with aStorageTypecolumn (otherwisenullis returned).table- the table of the givenrow.- Returns:
- the
Integer32value of theStorageTypecolumn in the givenrowornullif the table has noStorageTypecolumn or the value of that column isnull. - Since:
- 3.3.1
-
validate
public int validate(org.snmp4j.smi.Integer32 newValue, org.snmp4j.smi.Integer32 oldValue)- Overrides:
validatein classMOMutableColumn<org.snmp4j.smi.Integer32>
-
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 suppliedsubRequestshould be set to the appropriate error status value. This method is called only once per modified row.- Specified by:
prepareRowin interfaceRowModificationControlColumn- 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 alsotruefor rows with storage typereadOnlywhich did not follow the SMI definition ofStorageType. See alsoImportModefor details about restore data from stable storage.- Overrides:
isVolatilein classMOColumn<org.snmp4j.smi.Integer32>- Parameters:
row- a row of the table where this column is part of.column- the column index of this column inrow.- Returns:
trueif the storage type of this row isotherorvolatile_.
-
-