Interface RecordScanLimiter

    • Method Detail

      • reset

        @Nonnull
        RecordScanLimiter reset()
        Create a new RecordScanLimiter with this limiter's original limit, ignoring any calls to tryRecordScan().
        Returns:
        a new limiter with the same original scan limit as this limiter
      • isEnforcing

        boolean isEnforcing()
        Return whether or not this limiter has an actual limit.
        Returns:
        true if the limiter is enforcing a limit.
      • tryRecordScan

        boolean tryRecordScan()
        Atomically decrement the counter and return false if falls below 0.
        Returns:
        true if the remaining count is at least 0, and false if it is less than 0
      • getLimit

        int getLimit()
        Get the record scan limit. In particular, this will return the target number of records that this limiter is being used to enforce.
        Returns:
        the record scan limit being enforced
      • getRecordsScanned

        int getRecordsScanned()
        Returns the number of records that have been scanned thus far.
        Returns:
        the number of records that have been scanned