Class DemandPacer.Request

  • Enclosing interface:
    DemandPacer

    @Experimental("Demand pacing is a new experimental API introduced in Mutiny 1.5.0")
    public static class DemandPacer.Request
    extends java.lang.Object
    A demand request.
    • Constructor Summary

      Constructors 
      Constructor Description
      Request​(long demand, java.time.Duration delay)
      Constructs a new request.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.time.Duration delay()
      Get the delay
      long demand()
      Get the demand.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Request

        public Request​(long demand,
                       java.time.Duration delay)
        Constructs a new request.
        Parameters:
        demand - the number of items, must be strictly positive
        delay - the delay, must not be null, must be strictly positive
    • Method Detail

      • demand

        public long demand()
        Get the demand.
        Returns:
        the demand
      • delay

        public java.time.Duration delay()
        Get the delay
        Returns:
        the delay
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object