public abstract class BufferedMOMutableTableModel<R extends org.snmp4j.agent.mo.MOTableRow> extends BufferedMOTableModel<R> implements org.snmp4j.agent.mo.MOMutableTableModel<R>, org.snmp4j.agent.mo.MOTableRowListener<R>
BufferedMOTableModel.getMaxBufferSize() rows fetched from the backend.
Rows are removed from the buffer either when they are older than BufferedMOTableModel.getBufferTimeoutNanoSeconds() or
if the maximum number of buffered rows is reached.
Updates, row creations and removals are directly processed by the backend. Thus, updates are not buffered by this table model although the internal buffer reflects the changes.
IMPORTANT: The table model needs to be informed about row changes by calling the rowChanged(MOTableRowEvent)
method of the implemented MOTableRowListener interface. This is typically done by
adding this model as row listener with
DefaultMOTable.addMOTableRowListener(MOTableRowListener) but it can also be called
manually.
If you need to be sure that every row change is automatically processed by the backend through this
BufferedMOMutableTableModel then you will have to implement and use your own MOTableRow
implementation created by your own MOTableRowFactory. That row implementation has then
to call the rowChanged(MOTableRowEvent) of this table model after each change.
BufferedMOTableModel.BufferedMOTableRow<R extends org.snmp4j.agent.mo.MOTableRow>, BufferedMOTableModel.RowBufferIteratorbufferedChunksList, bufferedRows, bufferHits, bufferMisses, bufferTimeoutNanoSeconds, chunkSize, columnCount, firstRow, lastRow, maxBufferSize, rowFactory| Modifier | Constructor and Description |
|---|---|
protected |
BufferedMOMutableTableModel(org.snmp4j.agent.mo.MOTableRowFactory<R> rowFactory)
Creates a BufferedMOMutableTableModel with the specified
MOTableRowFactory. |
| Modifier and Type | Method and Description |
|---|---|
R |
addRow(R row) |
protected abstract void |
bulkDeleteRows(List<org.snmp4j.smi.OID> indexList)
Removes the rows with a row index that matches an entry in the supplied index list.
|
void |
clear() |
void |
clear(org.snmp4j.agent.mo.MOTableRowFilter<R> filter) |
protected abstract void |
deleteAllRows()
Removes all rows in the table.
|
protected abstract void |
deleteRow(org.snmp4j.smi.OID index)
Deletes a single row.
|
protected abstract void |
insertRow(org.snmp4j.smi.OID index,
org.snmp4j.smi.Variable[] values)
Inserts a non-existing row.
|
R |
removeRow(org.snmp4j.smi.OID index)
Removes a row from the table.
|
void |
rowChanged(org.snmp4j.agent.mo.MOTableRowEvent event) |
protected abstract void |
writeRow(org.snmp4j.smi.OID index,
org.snmp4j.smi.Variable[] values)
Updates/writes the content of a row.
|
cleanupBuffer, containsRow, fetchNextRows, fetchRow, firstIndex, firstRow, getBufferHits, getBufferMisses, getBufferTimeoutNanoSeconds, getChunkSize, getColumnCount, getFirstBufferRow, getLastBufferRow, getMaxBufferSize, getRow, getRow, getRowCount, getRowFactory, getRowFromBuffer, isRowValid, iterator, lastIndex, lastRow, resetBuffer, setBufferTimeoutNanoSeconds, setChunkSize, setMaxBufferSize, setRowFactory, tailIterator, toString, updateBufferclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRowFactory, setRowFactoryprotected BufferedMOMutableTableModel(org.snmp4j.agent.mo.MOTableRowFactory<R> rowFactory)
MOTableRowFactory.rowFactory - the row factory to be used to create rows from backend data.public R addRow(R row)
addRow in interface org.snmp4j.agent.mo.MOMutableTableModel<R extends org.snmp4j.agent.mo.MOTableRow>public void clear()
clear in interface org.snmp4j.agent.mo.MOMutableTableModel<R extends org.snmp4j.agent.mo.MOTableRow>public void clear(org.snmp4j.agent.mo.MOTableRowFilter<R> filter)
clear in interface org.snmp4j.agent.mo.MOMutableTableModel<R extends org.snmp4j.agent.mo.MOTableRow>protected abstract void deleteAllRows()
protected abstract void bulkDeleteRows(List<org.snmp4j.smi.OID> indexList)
indexList - the row indexes of the rows to remove.protected abstract void insertRow(org.snmp4j.smi.OID index,
org.snmp4j.smi.Variable[] values)
index - the row index of the new row.values - the values for the columns of the row.protected abstract void writeRow(org.snmp4j.smi.OID index,
org.snmp4j.smi.Variable[] values)
index - the row index of the existing row.values - the new values for the columns in that row.protected abstract void deleteRow(org.snmp4j.smi.OID index)
index - the row index of the deleting row.public void rowChanged(org.snmp4j.agent.mo.MOTableRowEvent event)
rowChanged in interface org.snmp4j.agent.mo.MOTableRowListener<R extends org.snmp4j.agent.mo.MOTableRow>public R removeRow(org.snmp4j.smi.OID index)
BufferedMOTableModelUnsupportedOperationException.removeRow in interface org.snmp4j.agent.mo.MOMutableTableModel<R extends org.snmp4j.agent.mo.MOTableRow>removeRow in class BufferedMOTableModel<R extends org.snmp4j.agent.mo.MOTableRow>index - the index of the target row.null if such a row does not exist.Copyright © 2020 SNMP4J.org. All rights reserved.