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 classBatchPolicy.Builder
-
Field Summary
Fields Modifier and Type Field Description protected intcapacitystatic BatchPolicyDEFAULTstatic BatchPolicyNO_BATCHprotected Durationthreshold
-
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.Builderbuilder()intgetCapacity()DurationgetTimeThreshold()StringtoString()
-
-
-
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()
-
-