Class BatchState
- java.lang.Object
-
- org.nuxeo.lib.stream.pattern.consumer.internals.BatchState
-
public class BatchState extends Object
Keep state of a batch according to a batch policy.- Since:
- 9.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BatchState.State
-
Field Summary
Fields Modifier and Type Field Description protected int
counter
protected long
endMs
protected BatchPolicy
policy
-
Constructor Summary
Constructors Constructor Description BatchState(BatchPolicy policy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
force()
int
getSize()
BatchState.State
getState()
BatchState.State
inc()
void
last()
void
start()
-
-
-
Field Detail
-
policy
protected final BatchPolicy policy
-
counter
protected int counter
-
endMs
protected long endMs
-
-
Constructor Detail
-
BatchState
public BatchState(BatchPolicy policy)
-
-
Method Detail
-
start
public void start()
-
inc
public BatchState.State inc()
-
force
public void force()
-
last
public void last()
-
getState
public BatchState.State getState()
-
getSize
public int getSize()
-
-