Class SoftDeletes.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<SoftDeletes.Builder>
co.elastic.clients.elasticsearch.indices.SoftDeletes.Builder
- All Implemented Interfaces:
WithJson<SoftDeletes.Builder>
,ObjectBuilder<SoftDeletes>
- Enclosing class:
- SoftDeletes
public static class SoftDeletes.Builder extends WithJsonObjectBuilderBase<SoftDeletes.Builder> implements ObjectBuilder<SoftDeletes>
Builder for
SoftDeletes
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description SoftDeletes
build()
Builds aSoftDeletes
.SoftDeletes.Builder
enabled(java.lang.Boolean value)
Indicates whether soft deletes are enabled on the index.SoftDeletes.Builder
retentionLease(RetentionLease value)
The maximum period to retain a shard history retention lease before it is considered expired.SoftDeletes.Builder
retentionLease(java.util.function.Function<RetentionLease.Builder,ObjectBuilder<RetentionLease>> fn)
The maximum period to retain a shard history retention lease before it is considered expired.protected SoftDeletes.Builder
self()
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
-
enabled
Indicates whether soft deletes are enabled on the index.API name:
enabled
-
retentionLease
The maximum period to retain a shard history retention lease before it is considered expired. Shard history retention leases ensure that soft deletes are retained during merges on the Lucene index. If a soft delete is merged away before it can be replicated to a follower the following process will fail due to incomplete history on the leader.API name:
retention_lease
-
retentionLease
public final SoftDeletes.Builder retentionLease(java.util.function.Function<RetentionLease.Builder,ObjectBuilder<RetentionLease>> fn)The maximum period to retain a shard history retention lease before it is considered expired. Shard history retention leases ensure that soft deletes are retained during merges on the Lucene index. If a soft delete is merged away before it can be replicated to a follower the following process will fail due to incomplete history on the leader.API name:
retention_lease
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<SoftDeletes.Builder>
-
build
Builds aSoftDeletes
.- Specified by:
build
in interfaceObjectBuilder<SoftDeletes>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-