Class CentralizedReservoir


  • public class CentralizedReservoir
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getCurrentEpoch()  
      long getInterval()  
      long getQuota()  
      long getUsed()  
      boolean isBorrow​(java.time.Instant now)  
      boolean isExpired​(java.time.Instant now)  
      boolean isStale​(java.time.Instant now)  
      boolean take​(java.time.Instant now)  
      void update​(com.amazonaws.services.xray.model.SamplingRule r)  
      void update​(com.amazonaws.services.xray.model.SamplingTargetDocument target, java.time.Instant now)  
      • Methods inherited from class java.lang.Object

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

      • CentralizedReservoir

        public CentralizedReservoir​(long capacity)
    • Method Detail

      • update

        public void update​(com.amazonaws.services.xray.model.SamplingRule r)
      • isExpired

        public boolean isExpired​(java.time.Instant now)
      • isBorrow

        public boolean isBorrow​(java.time.Instant now)
      • isStale

        public boolean isStale​(java.time.Instant now)
      • update

        public void update​(com.amazonaws.services.xray.model.SamplingTargetDocument target,
                           java.time.Instant now)
      • take

        public boolean take​(java.time.Instant now)
      • getQuota

        public long getQuota()
      • getUsed

        public long getUsed()
      • getCurrentEpoch

        public long getCurrentEpoch()
      • getInterval

        public long getInterval()