Module org.snmp4j.agent
Package org.snmp4j.agent.mo.util
Class LogMOTableSizeLimit<R extends MOTableRow>
java.lang.Object
org.snmp4j.agent.mo.util.MOTableSizeLimit<R>
org.snmp4j.agent.mo.util.LogMOTableSizeLimit<R>
- All Implemented Interfaces:
EventListener
,MOTableRowListener<R>
The
LogMOTableSizeLimit
implements a MOTableSizeLimit
to limit the number of entries in a table by removing the eldest rows
existing in the table when the limit is exceeded.- Since:
- 1.1.5
- Version:
- 1.1.5
- Author:
- Frank Fock
-
Field Summary
Fields inherited from class org.snmp4j.agent.mo.util.MOTableSizeLimit
PROPERTY_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
removeEldest
(MOTableRowEvent<R> triggeringEvent, int numRows) Removes the given number of rows starting at the lowest index value.Methods inherited from class org.snmp4j.agent.mo.util.MOTableSizeLimit
getLimits, getMaxNumRows, rowChanged, setLimits, setMaxNumRows
-
Constructor Details
-
LogMOTableSizeLimit
public LogMOTableSizeLimit(int maxNumRows) -
LogMOTableSizeLimit
-
-
Method Details
-
removeEldest
Removes the given number of rows starting at the lowest index value.- Overrides:
removeEldest
in classMOTableSizeLimit<R extends MOTableRow>
- Parameters:
triggeringEvent
- the MOTableRowEvent object that describes the table with exceeding row limit.numRows
- the number of rows to remove (if possible).- Returns:
true
if one or more rows could be removed andfalse
if the causing event should be denied/rejected. The default implementation returnsfalse
always.
-