Class SharedFileSystemRepositorySettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.snapshot.RepositorySettingsBase.AbstractBuilder<SharedFileSystemRepositorySettings.Builder>
co.elastic.clients.elasticsearch.snapshot.SharedFileSystemRepositorySettings.Builder
- All Implemented Interfaces:
WithJson<SharedFileSystemRepositorySettings.Builder>
,ObjectBuilder<SharedFileSystemRepositorySettings>
- Enclosing class:
- SharedFileSystemRepositorySettings
public static class SharedFileSystemRepositorySettings.Builder
extends RepositorySettingsBase.AbstractBuilder<SharedFileSystemRepositorySettings.Builder>
implements ObjectBuilder<SharedFileSystemRepositorySettings>
Builder for
SharedFileSystemRepositorySettings
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aSharedFileSystemRepositorySettings
.Required - The location of the shared filesystem used to store and retrieve snapshots.maxNumberOfSnapshots
(Integer value) The maximum number of snapshots the repository can contain.Iftrue
, the repository is read-only.self()
Methods inherited from class co.elastic.clients.elasticsearch.snapshot.RepositorySettingsBase.AbstractBuilder
chunkSize, compress, maxRestoreBytesPerSec, maxSnapshotBytesPerSec
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
location
Required - The location of the shared filesystem used to store and retrieve snapshots. This location must be registered in thepath.repo
setting on all master and data nodes in the cluster. Unlikepath.repo
, this setting supports only a single file path.API name:
location
-
maxNumberOfSnapshots
public final SharedFileSystemRepositorySettings.Builder maxNumberOfSnapshots(@Nullable Integer value) The maximum number of snapshots the repository can contain. The default isInteger.MAX_VALUE
, which is 2^31-1 or2147483647
.API name:
max_number_of_snapshots
-
readonly
Iftrue
, the repository is read-only. The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.Only a cluster with write access can create snapshots in the repository. All other clusters connected to the repository should have the
readonly
parameter set totrue
.If
false
, the cluster can write to the repository and create snapshots in it.IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository.
API name:
readonly
-
self
- Specified by:
self
in classRepositorySettingsBase.AbstractBuilder<SharedFileSystemRepositorySettings.Builder>
-
build
Builds aSharedFileSystemRepositorySettings
.- Specified by:
build
in interfaceObjectBuilder<SharedFileSystemRepositorySettings>
- Throws:
NullPointerException
- if some of the required fields are null.
-