Package cz.o2.proxima.core.storage
Interface ThroughputLimiter
- 
- All Superinterfaces:
- java.lang.AutoCloseable,- java.io.Closeable,- java.io.Serializable
 - All Known Implementing Classes:
- GlobalWatermarkThroughputLimiter,- ThroughputLimiter.NoOpThroughputLimiter
 
 @Evolving public interface ThroughputLimiter extends java.io.Serializable, java.io.Closeable A limiter of data rate coming from various sources.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceThroughputLimiter.ContextA context ofgetPauseTime(cz.o2.proxima.core.storage.ThroughputLimiter.Context)method.static classThroughputLimiter.NoOpThroughputLimiter
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclose()java.time.DurationgetPauseTime(ThroughputLimiter.Context context)Retrieve the amount of time the source should pause processing for.default voidsetup(java.util.Map<java.lang.String,java.lang.Object> cfg)Setup the limiter with given configuration.
 
- 
- 
- 
Method Detail- 
setupdefault void setup(java.util.Map<java.lang.String,java.lang.Object> cfg) Setup the limiter with given configuration.- Parameters:
- cfg- configuration (scoped to a (operator) defined prefix)
 
 - 
getPauseTimejava.time.Duration getPauseTime(ThroughputLimiter.Context context) Retrieve the amount of time the source should pause processing for. If the reader should proceed without pausing returnDuration.ZERO. Note that this method is called for each input element andmustbe therefore cheap.- Parameters:
- context- context for the limiter
- Returns:
- the amount of time to pause the source for.
 
 - 
closevoid close() - Specified by:
- closein interface- java.lang.AutoCloseable
- Specified by:
- closein interface- java.io.Closeable
 
 
- 
 
-