org.snmp4j.agent.mo.util
Class LogMOTableSizeLimit

java.lang.Object
  extended by org.snmp4j.agent.mo.util.MOTableSizeLimit
      extended by org.snmp4j.agent.mo.util.LogMOTableSizeLimit
All Implemented Interfaces:
java.util.EventListener, MOTableRowListener

public class LogMOTableSizeLimit
extends MOTableSizeLimit

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
LogMOTableSizeLimit(int maxNumRows)
           
LogMOTableSizeLimit(java.util.Properties limits)
           
 
Method Summary
protected  boolean removeEldest(MOTableRowEvent 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogMOTableSizeLimit

public LogMOTableSizeLimit(int maxNumRows)

LogMOTableSizeLimit

public LogMOTableSizeLimit(java.util.Properties limits)
Method Detail

removeEldest

protected boolean removeEldest(MOTableRowEvent triggeringEvent,
                               int numRows)
Removes the given number of rows starting at the lowest index value.

Overrides:
removeEldest in class MOTableSizeLimit
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.

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.