Class BatchPolicy
- java.lang.Object
-
- org.nuxeo.lib.stream.pattern.consumer.BatchPolicy
-
public class BatchPolicy extends Object
Describe when a batch must be flushed.- Since:
- 9.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BatchPolicy.Builder
-
Field Summary
Fields Modifier and Type Field Description protected int
capacity
static BatchPolicy
DEFAULT
static BatchPolicy
NO_BATCH
protected Duration
threshold
-
Constructor Summary
Constructors Constructor Description BatchPolicy(BatchPolicy.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BatchPolicy.Builder
builder()
int
getCapacity()
Duration
getTimeThreshold()
String
toString()
-
-
-
Field Detail
-
NO_BATCH
public static final BatchPolicy NO_BATCH
-
DEFAULT
public static final BatchPolicy DEFAULT
-
capacity
protected final int capacity
-
threshold
protected final Duration threshold
-
-
Constructor Detail
-
BatchPolicy
public BatchPolicy(BatchPolicy.Builder builder)
-
-
Method Detail
-
getCapacity
public int getCapacity()
-
getTimeThreshold
public Duration getTimeThreshold()
-
builder
public static BatchPolicy.Builder builder()
-
-