Class MOTableSizeLimit<R extends MOTableRow>

    • Field Detail

      • PROPERTY_PREFIX

        public static final String PROPERTY_PREFIX
        The property prefix each size limit definition has to start with. The OID subtree for which the definition is effective is then appended as follows: snmp4j.MOTableSizeLimit.&lt;OID&gt;=&lt;limit&gt; where limit is a positive number or zero.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MOTableSizeLimit

        public MOTableSizeLimit​(int maxNumRows)
      • MOTableSizeLimit

        public MOTableSizeLimit​(Properties limits)
    • Method Detail

      • removeEldest

        protected boolean removeEldest​(MOTableRowEvent<R> triggeringEvent,
                                       int numRows)
        Remove try to remove a given number of eldest rows of the table referred to in the triggering event object.
        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.
      • setMaxNumRows

        public void setMaxNumRows​(int maxNumRows)
      • getMaxNumRows

        public int getMaxNumRows()
      • setLimits

        public void setLimits​(Properties limits)