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
ConstructorsConstructorDescriptionBufferedMOTableRow(R bufferedRow) Creates a new buffer row for the specified payload row. -
Method Summary
Modifier and TypeMethodDescriptionorg.snmp4j.agent.mo.MOTableRowReturns the buffered row.org.snmp4j.smi.OIDgetIndex()longReturns the time when this buffered row has been refreshed from the backend last.Gets the immediately following row in the buffer.org.snmp4j.smi.VariablegetValue(int column) voidsetBaseRow(org.snmp4j.agent.mo.MOTableRow baseRow) voidsetBufferedRow(R bufferedRow) voidsetLastRefresh(long lastRefresh) Sets the time when this buffered row has been refreshed from the backend last.voidsetNextRow(BufferedMOTableModel<R>.BufferedMOTableRow<R> nextRow) Sets the immediately following row in the buffer.intsize()
-
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
nullif such a row has not been buffered yet.
-
setNextRow
Sets the immediately following row in the buffer.- Parameters:
nextRow- the immediate successor row andnullif such a row has not been buffered yet.
-
getIndex
public org.snmp4j.smi.OID getIndex()- Specified by:
getIndexin interfaceorg.snmp4j.agent.mo.MOTableRow
-
getValue
public org.snmp4j.smi.Variable getValue(int column) - Specified by:
getValuein interfaceorg.snmp4j.agent.mo.MOTableRow
-
getBaseRow
public org.snmp4j.agent.mo.MOTableRow getBaseRow()- Specified by:
getBaseRowin interfaceorg.snmp4j.agent.mo.MOTableRow
-
setBaseRow
public void setBaseRow(org.snmp4j.agent.mo.MOTableRow baseRow) - Specified by:
setBaseRowin interfaceorg.snmp4j.agent.mo.MOTableRow
-
size
public int size()- Specified by:
sizein 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.
-