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>
public class LogMOTableSizeLimit<R extends MOTableRow> extends MOTableSizeLimit<R>
TheLogMOTableSizeLimitimplements aMOTableSizeLimitto 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(Properties limits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanremoveEldest(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 Detail
-
LogMOTableSizeLimit
public LogMOTableSizeLimit(int maxNumRows)
-
LogMOTableSizeLimit
public LogMOTableSizeLimit(Properties limits)
-
-
Method Detail
-
removeEldest
protected boolean removeEldest(MOTableRowEvent<R> triggeringEvent, int numRows)
Removes the given number of rows starting at the lowest index value.- Overrides:
removeEldestin 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:
trueif one or more rows could be removed andfalseif the causing event should be denied/rejected. The default implementation returnsfalsealways.
-
-