Package org.cache2k.addon
Class CoalescingBulkLoaderConfig.Builder
- java.lang.Object
-
- org.cache2k.addon.CoalescingBulkLoaderConfig.Builder
-
- All Implemented Interfaces:
org.cache2k.config.ConfigBuilder<CoalescingBulkLoaderConfig.Builder,CoalescingBulkLoaderConfig>
,org.cache2k.config.SectionBuilder<CoalescingBulkLoaderConfig.Builder,CoalescingBulkLoaderConfig>
- Enclosing class:
- CoalescingBulkLoaderConfig
public static class CoalescingBulkLoaderConfig.Builder extends Object implements org.cache2k.config.SectionBuilder<CoalescingBulkLoaderConfig.Builder,CoalescingBulkLoaderConfig>
-
-
Constructor Summary
Constructors Constructor Description Builder(CoalescingBulkLoaderConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoalescingBulkLoaderConfig
config()
CoalescingBulkLoaderConfig.Builder
maxBatchSize(int v)
If the number of entries waiting for sending to the loader is reached the loader will be called even the delay timespan is not reached yet.CoalescingBulkLoaderConfig.Builder
maxDelay(long duration, TimeUnit unit)
Maximum timespan a load request may be delayed before its sent to the loader.CoalescingBulkLoaderConfig.Builder
refreshOnly(boolean v)
Only do coalesce for refresh ahead requests, user requests will be executed immediately.
-
-
-
Constructor Detail
-
Builder
public Builder(CoalescingBulkLoaderConfig config)
-
-
Method Detail
-
maxDelay
public CoalescingBulkLoaderConfig.Builder maxDelay(long duration, TimeUnit unit)
Maximum timespan a load request may be delayed before its sent to the loader. Default is 100 milliseconds.
-
maxBatchSize
public CoalescingBulkLoaderConfig.Builder maxBatchSize(int v)
If the number of entries waiting for sending to the loader is reached the loader will be called even the delay timespan is not reached yet. Default is 100.
-
refreshOnly
public CoalescingBulkLoaderConfig.Builder refreshOnly(boolean v)
Only do coalesce for refresh ahead requests, user requests will be executed immediately. Default istrue
.
-
config
public CoalescingBulkLoaderConfig config()
- Specified by:
config
in interfaceorg.cache2k.config.ConfigBuilder<CoalescingBulkLoaderConfig.Builder,CoalescingBulkLoaderConfig>
-
-