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>
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
  • Constructor Details

    • LogMOTableSizeLimit

      public LogMOTableSizeLimit(int maxNumRows)
    • LogMOTableSizeLimit

      public LogMOTableSizeLimit(Properties limits)
  • Method Details

    • removeEldest

      protected boolean removeEldest(MOTableRowEvent<R> triggeringEvent, int numRows)
      Removes the given number of rows starting at the lowest index value.
      Overrides:
      removeEldest in class MOTableSizeLimit<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 and false if the causing event should be denied/rejected. The default implementation returns false always.