public class LogMOTableSizeLimit<R extends MOTableRow> extends MOTableSizeLimit<R>
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.PROPERTY_PREFIX
Constructor and Description |
---|
LogMOTableSizeLimit(int maxNumRows) |
LogMOTableSizeLimit(Properties limits) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
removeEldest(MOTableRowEvent<R> triggeringEvent,
int numRows)
Removes the given number of rows starting at the lowest index value.
|
getLimits, getMaxNumRows, rowChanged, setLimits, setMaxNumRows
public LogMOTableSizeLimit(int maxNumRows)
public LogMOTableSizeLimit(Properties limits)
protected boolean removeEldest(MOTableRowEvent<R> triggeringEvent, int numRows)
removeEldest
in class MOTableSizeLimit<R extends MOTableRow>
triggeringEvent
- the MOTableRowEvent object that describes the
table with exceeding row limit.numRows
- the number of rows to remove (if possible).true
if one or more rows could be removed and
false
if the causing event should be denied/rejected. The
default implementation returns false
always.Copyright © 2019 SNMP4J.org. All rights reserved.