Class Translog.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<Translog.Builder>
co.elastic.clients.elasticsearch.indices.Translog.Builder
- All Implemented Interfaces:
WithJson<Translog.Builder>
,ObjectBuilder<Translog>
- Enclosing class:
- Translog
public static class Translog.Builder extends WithJsonObjectBuilderBase<Translog.Builder> implements ObjectBuilder<Translog>
Builder for
Translog
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description Translog
build()
Builds aTranslog
.Translog.Builder
durability(TranslogDurability value)
Whether or not tofsync
and commit the translog after every index, delete, update, or bulk request.Translog.Builder
flushThresholdSize(java.lang.String value)
The translog stores all operations that are not yet safely persisted in Lucene (i.e., are not part of a Lucene commit point).Translog.Builder
retention(TranslogRetention value)
API name:retention
Translog.Builder
retention(java.util.function.Function<TranslogRetention.Builder,ObjectBuilder<TranslogRetention>> fn)
API name:retention
protected Translog.Builder
self()
Translog.Builder
syncInterval(Time value)
How often the translog is fsynced to disk and committed, regardless of write operations.Translog.Builder
syncInterval(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
How often the translog is fsynced to disk and committed, regardless of write operations.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
syncInterval
How often the translog is fsynced to disk and committed, regardless of write operations. Values less than 100ms are not allowed.API name:
sync_interval
-
syncInterval
public final Translog.Builder syncInterval(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)How often the translog is fsynced to disk and committed, regardless of write operations. Values less than 100ms are not allowed.API name:
sync_interval
-
durability
Whether or not tofsync
and commit the translog after every index, delete, update, or bulk request.API name:
durability
-
flushThresholdSize
The translog stores all operations that are not yet safely persisted in Lucene (i.e., are not part of a Lucene commit point). Although these operations are available for reads, they will need to be replayed if the shard was stopped and had to be recovered. This setting controls the maximum total size of these operations, to prevent recoveries from taking too long. Once the maximum size has been reached a flush will happen, generating a new Lucene commit point.API name:
flush_threshold_size
-
retention
API name:retention
-
retention
public final Translog.Builder retention(java.util.function.Function<TranslogRetention.Builder,ObjectBuilder<TranslogRetention>> fn)API name:retention
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<Translog.Builder>
-
build
Builds aTranslog
.- Specified by:
build
in interfaceObjectBuilder<Translog>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-