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:
java.util.EventListener
,MOTableRowListener<R>
public class LogMOTableSizeLimit<R extends MOTableRow> extends MOTableSizeLimit<R>
TheLogMOTableSizeLimit
implements aMOTableSizeLimit
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
Constructors Constructor Description LogMOTableSizeLimit(int maxNumRows)
LogMOTableSizeLimit(java.util.Properties limits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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
-
-
-
-
Method Detail
-
removeEldest
protected boolean removeEldest(MOTableRowEvent<R> triggeringEvent, int numRows)
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.
-
-