Package org.snmp4j.agent.mox
Class BufferedMOTableModel.BufferedMOTableRow<R extends org.snmp4j.agent.mo.MOTableRow>
java.lang.Object
org.snmp4j.agent.mox.BufferedMOTableModel.BufferedMOTableRow<R>
- Type Parameters:
R
- the payload row class which has to match the models row class as created byBufferedMOTableModel.rowFactory
.
- All Implemented Interfaces:
org.snmp4j.agent.mo.MOTableRow
- Enclosing class:
BufferedMOTableModel<R extends org.snmp4j.agent.mo.MOTableRow>
protected class BufferedMOTableModel.BufferedMOTableRow<R extends org.snmp4j.agent.mo.MOTableRow>
extends Object
implements org.snmp4j.agent.mo.MOTableRow
The BufferedMOTableRow is a wrapper class that holds additional information for the buffering.
It implements a forward linked list to direct successor rows for fast and easy traversal of the
buffer.
-
Constructor Summary
ConstructorDescriptionBufferedMOTableRow
(R bufferedRow) Creates a new buffer row for the specified payload row. -
Method Summary
Modifier and TypeMethodDescriptionorg.snmp4j.agent.mo.MOTableRow
Returns the buffered row.org.snmp4j.smi.OID
getIndex()
long
Returns the time when this buffered row has been refreshed from the backend last.Gets the immediately following row in the buffer.org.snmp4j.smi.Variable
getValue
(int column) void
setBaseRow
(org.snmp4j.agent.mo.MOTableRow baseRow) void
setBufferedRow
(R bufferedRow) void
setLastRefresh
(long lastRefresh) Sets the time when this buffered row has been refreshed from the backend last.void
setNextRow
(BufferedMOTableModel<R>.BufferedMOTableRow<R> nextRow) Sets the immediately following row in the buffer.int
size()
-
Constructor Details
-
BufferedMOTableRow
Creates a new buffer row for the specified payload row. It also sets thegetLastRefresh()
time to the current time.- Parameters:
bufferedRow
- the buffered payload row.
-
-
Method Details
-
getBufferedRow
Returns the buffered row.- Returns:
- the buffered row.
-
setBufferedRow
-
getNextRow
Gets the immediately following row in the buffer.- Returns:
- the immediate successor row and
null
if such a row has not been buffered yet.
-
setNextRow
Sets the immediately following row in the buffer.- Parameters:
nextRow
- the immediate successor row andnull
if such a row has not been buffered yet.
-
getIndex
public org.snmp4j.smi.OID getIndex()- Specified by:
getIndex
in interfaceorg.snmp4j.agent.mo.MOTableRow
-
getValue
public org.snmp4j.smi.Variable getValue(int column) - Specified by:
getValue
in interfaceorg.snmp4j.agent.mo.MOTableRow
-
getBaseRow
public org.snmp4j.agent.mo.MOTableRow getBaseRow()- Specified by:
getBaseRow
in interfaceorg.snmp4j.agent.mo.MOTableRow
-
setBaseRow
public void setBaseRow(org.snmp4j.agent.mo.MOTableRow baseRow) - Specified by:
setBaseRow
in interfaceorg.snmp4j.agent.mo.MOTableRow
-
size
public int size()- Specified by:
size
in interfaceorg.snmp4j.agent.mo.MOTableRow
-
getLastRefresh
public long getLastRefresh()Returns the time when this buffered row has been refreshed from the backend last.- Returns:
- the last refresh time in nanoseconds.
-
setLastRefresh
public void setLastRefresh(long lastRefresh) Sets the time when this buffered row has been refreshed from the backend last.- Parameters:
lastRefresh
- the last refresh time in nanoseconds.
-