Class MetricBucketListener

java.lang.Object
com.giffing.bucket4j.spring.boot.starter.context.metrics.MetricBucketListener
All Implemented Interfaces:
io.github.bucket4j.BucketListener

public class MetricBucketListener
extends java.lang.Object
implements io.github.bucket4j.BucketListener
Marker Interface
  • Field Summary

    Fields inherited from interface io.github.bucket4j.BucketListener

    NOPE
  • Constructor Summary

    Constructors 
    Constructor Description
    MetricBucketListener​(java.lang.String name, MetricHandler metricHandler, java.util.List<MetricType> allowedTypes, java.util.List<MetricTagResult> tags)  
  • Method Summary

    Modifier and Type Method Description
    long getConsumed()  
    long getInterrupted()  
    java.lang.String getName()  
    long getParkedNanos()  
    long getRejected()  
    void onConsumed​(long tokens)  
    void onDelayed​(long nanos)  
    void onInterrupted​(java.lang.InterruptedException e)  
    void onParked​(long nanos)  
    void onRejected​(long tokens)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • onConsumed

      public void onConsumed​(long tokens)
      Specified by:
      onConsumed in interface io.github.bucket4j.BucketListener
    • onRejected

      public void onRejected​(long tokens)
      Specified by:
      onRejected in interface io.github.bucket4j.BucketListener
    • onParked

      public void onParked​(long nanos)
      Specified by:
      onParked in interface io.github.bucket4j.BucketListener
    • getConsumed

      public long getConsumed()
    • getRejected

      public long getRejected()
    • getParkedNanos

      public long getParkedNanos()
    • getInterrupted

      public long getInterrupted()
    • onInterrupted

      public void onInterrupted​(java.lang.InterruptedException e)
      Specified by:
      onInterrupted in interface io.github.bucket4j.BucketListener
    • onDelayed

      public void onDelayed​(long nanos)
      Specified by:
      onDelayed in interface io.github.bucket4j.BucketListener
    • getName

      public java.lang.String getName()