java.lang.Comparable
, MOMutableRow2PC
, MOMutableTableRow
, MOTableRow
NotificationLogMib.NlmConfigLogEntryRow
, NotificationLogMib.NlmLogEntryRow
, NotificationLogMib.NlmLogVariableEntryRow
, NotificationLogMib.NlmStatsLogEntryRow
, Snmp4jDemoMib.Snmp4jDemoEntryRow
, Snmp4jDemoMib.Snmp4jDemoSparseEntryRow
, Snmp4jHeartbeatMib.Snmp4jAgentHBCtrlEntryRow
, Snmp4jLogMib.Snmp4jLogLoggerRow
, Snmp4jProxyMib.Snmp4jProxyEntryRow
, SnmpCommunityMIB.SnmpCommunityEntryRow
, SnmpProxyMIB.SnmpProxyRow
, SnmpTargetMIB.SnmpTargetAddrEntryRow
, SnmpTlsTmMib.SnmpTlstmAddrEntryRow
, SnmpTlsTmMib.SnmpTlstmCertToTSNEntryRow
, SnmpTlsTmMib.SnmpTlstmParamsEntryRow
, SnmpUsmDhObjectsMib.UsmDHKickstartEntryRow
, SnmpUsmDhObjectsMib.UsmDHUserKeyEntryRow
, UsmMIB.UsmTableRow
public class DefaultMOMutableRow2PC extends DefaultMOTableRow implements MOMutableRow2PC
index, values
Constructor | Description |
---|---|
DefaultMOMutableRow2PC(org.snmp4j.smi.OID index,
org.snmp4j.smi.Variable[] values) |
Modifier and Type | Method | Description |
---|---|---|
void |
cleanup(SubRequest subRequest,
int column) |
Cleanups resources holds for changes to a single column.
|
void |
cleanupRow(SubRequest request,
DefaultMOTable.ChangeSet changeSet) |
Cleans up resources for a row.
|
void |
commit(SubRequest subRequest,
MOTableRow changeSet,
int column) |
Commits changes to single column.
|
void |
commitRow(SubRequest subRequest,
MOTableRow changeSet) |
Commits a row as described by the supplied change set.
|
MOTableRow |
getBaseRow() |
Gets the associated base row for this row (if this row is a dependent row).
|
org.snmp4j.smi.OID |
getIndex() |
Gets the row's index OID, for example the row index of the first row
of an ifTable would return
OID("1") . |
org.snmp4j.smi.Variable |
getResultingValue(int column,
MOTableRow changes) |
Returns the value of the specified column that would result if the
specified changes would have been applied to the row.
|
java.lang.Object |
getUserObject() |
|
org.snmp4j.smi.Variable |
getValue(int column) |
Gets the value at the specified column index.
|
void |
prepare(SubRequest subRequest,
MOTableRow changeSet,
int column) |
Prepares changing a single column.
|
void |
prepareRow(SubRequest subRequest,
MOTableRow changeSet) |
Prepares a row for changes described by the supplied change set.
|
void |
setBaseRow(MOTableRow baseRow) |
Sets the associated base row.
|
void |
setUserObject(java.lang.Object userObject) |
|
void |
setValue(int column,
org.snmp4j.smi.Variable value) |
Sets the value of a column of this row.
|
int |
size() |
Returns the number of columns in this row.
|
java.lang.String |
toString() |
|
void |
undo(SubRequest subRequest,
int column) |
Undos the changes to a single column.
|
void |
undoRow(SubRequest request,
DefaultMOTable.ChangeSet changeSet) |
Undoes changes to a row.
|
compareTo, equals, hashCode, toStringMembers
public DefaultMOMutableRow2PC(org.snmp4j.smi.OID index, org.snmp4j.smi.Variable[] values)
public void cleanup(SubRequest subRequest, int column)
MOMutableRow2PC
cleanup
in interface MOMutableRow2PC
subRequest
- the sub-request that corresponds to the column change.column
- the column index of the changed column.public void commit(SubRequest subRequest, MOTableRow changeSet, int column)
MOMutableRow2PC
commit
in interface MOMutableRow2PC
subRequest
- the sub-request that corresponds to the column change. This object
can be used to deny the commit phase and triggering the undo phase
by setting its error status.changeSet
- a MOTableRow instance that represents the state of the row if all
changes have been applied successfully.column
- the column index of the column to be changed.public MOTableRow getBaseRow()
MOTableRow
getBaseRow
in interface MOTableRow
getBaseRow
in class DefaultMOTableRow
null
if this row is a base row itself.public org.snmp4j.smi.OID getIndex()
MOTableRow
OID("1")
.getIndex
in interface MOTableRow
getIndex
in class DefaultMOTableRow
public java.lang.Object getUserObject()
public org.snmp4j.smi.Variable getValue(int column)
MOTableRow
getValue
in interface MOTableRow
getValue
in class DefaultMOTableRow
column
- the zero-based column index.public void setBaseRow(MOTableRow baseRow)
MOTableRow
setBaseRow
in interface MOMutableTableRow
setBaseRow
in interface MOTableRow
setBaseRow
in class DefaultMOTableRow
baseRow
- the base row.public void setUserObject(java.lang.Object userObject)
public void setValue(int column, org.snmp4j.smi.Variable value)
MOMutableTableRow
setValue
in interface MOMutableTableRow
column
- the (zero-based) column index.value
- the new value for the specified column. Implementations of this method
may not check the value's type to match the columns type for performance
reasons. Thus, the caller have to make sure that the type's match to
avoid runtime exceptions later.public int size()
MOTableRow
size
in interface MOTableRow
size
in class DefaultMOTableRow
public void undo(SubRequest subRequest, int column)
MOMutableRow2PC
undo
in interface MOMutableRow2PC
subRequest
- the sub-request that corresponds to the column change.column
- the column index of the changed column.public org.snmp4j.smi.Variable getResultingValue(int column, MOTableRow changes)
column
- the column to returnchanges
- a MOTableRow
instance representing the changes to apply
to this row. Values that are not changed must be returned as
null
values.Variable
.public void commitRow(SubRequest subRequest, MOTableRow changeSet)
MOMutableRow2PC
subRequest
should be set to
commitFailed
. Setting this error should be avoided under
any circumstances.
This method is called only once per modified row.
commitRow
in interface MOMutableRow2PC
subRequest
- the sub-request that triggered the row change and that can be used
to trigger the undo phase by setting its error status.changeSet
- a MOTableRow instance that represents the state of the row if all
changes have been applied successfully.public void prepare(SubRequest subRequest, MOTableRow changeSet, int column)
MOMutableRow2PC
prepare
in interface MOMutableRow2PC
subRequest
- the sub-request that corresponds to the column change. This object
can be used to deny the commit phase by setting its error status.changeSet
- a MOTableRow instance that represents the state of the row if all
changes have been applied successfully.column
- the column index of the column to be changed.public void cleanupRow(SubRequest request, DefaultMOTable.ChangeSet changeSet)
MOMutableRow2PC
This method is called only once per modified row.
cleanupRow
in interface MOMutableRow2PC
request
- the sub-request that triggered the row change.changeSet
- a MOTableRow instance that represents the state of the row if all
changes have been applied successfully.public void undoRow(SubRequest request, DefaultMOTable.ChangeSet changeSet)
MOMutableRow2PC
This method is called only once per modified row.
undoRow
in interface MOMutableRow2PC
request
- the sub-request that triggered the row change.changeSet
- a MOTableRow instance that represents the state of the row if all
changes have been applied successfully.public void prepareRow(SubRequest subRequest, MOTableRow changeSet)
MOMutableRow2PC
subRequest
should be set to the appropriate error
status value.
This method is called only once per modified row.
prepareRow
in interface MOMutableRow2PC
subRequest
- the sub-request that triggered the row change and that can be used
to deny the commit phase by setting its error status.changeSet
- a MOTableRow instance that represents the state of the row if all
changes have been applied successfully.public java.lang.String toString()
toString
in class DefaultMOTableRow
Copyright © 2018 SNMP4J.org. All rights reserved.