Class CentralizedReservoir
- java.lang.Object
-
- com.amazonaws.xray.strategy.sampling.reservoir.CentralizedReservoir
-
public class CentralizedReservoir extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CentralizedReservoir(long capacity)
-
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)
-
-
-
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()
-
-