Package cz.o2.proxima.core.storage
Class ThroughputLimiter.NoOpThroughputLimiter
- java.lang.Object
-
- cz.o2.proxima.core.storage.ThroughputLimiter.NoOpThroughputLimiter
-
- All Implemented Interfaces:
ThroughputLimiter
,java.io.Closeable
,java.io.Serializable
,java.lang.AutoCloseable
- Enclosing interface:
- ThroughputLimiter
public static class ThroughputLimiter.NoOpThroughputLimiter extends java.lang.Object implements ThroughputLimiter
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cz.o2.proxima.core.storage.ThroughputLimiter
ThroughputLimiter.Context, ThroughputLimiter.NoOpThroughputLimiter
-
-
Field Summary
Fields Modifier and Type Field Description static ThroughputLimiter
INSTANCE
-
Constructor Summary
Constructors Constructor Description NoOpThroughputLimiter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.time.Duration
getPauseTime(ThroughputLimiter.Context context)
Retrieve the amount of time the source should pause processing for.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cz.o2.proxima.core.storage.ThroughputLimiter
setup
-
-
-
-
Field Detail
-
INSTANCE
public static final ThroughputLimiter INSTANCE
-
-
Method Detail
-
getPauseTime
public java.time.Duration getPauseTime(ThroughputLimiter.Context context)
Description copied from interface:ThroughputLimiter
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 andmust
be therefore cheap.- Specified by:
getPauseTime
in interfaceThroughputLimiter
- Parameters:
context
- context for the limiter- Returns:
- the amount of time to pause the source for.
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceThroughputLimiter
-
-