Module org.elasticsearch.server
Class PutRepositoryRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.support.master.MasterNodeRequest<Request>
org.elasticsearch.action.support.master.AcknowledgedRequest<PutRepositoryRequest>
org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryRequest
- All Implemented Interfaces:
- AckedRequest,- Writeable,- RefCounted,- TaskAwareRequest,- ToXContent,- ToXContentObject
public class PutRepositoryRequest
extends AcknowledgedRequest<PutRepositoryRequest>
implements ToXContentObject
Register repository request.
 
Registers a repository with given name, type and settings. If the repository with the same name already exists in the cluster, the new repository will replace the existing repository.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequestTransportRequest.EmptyNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContentToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.WriteableWriteable.Reader<V>, Writeable.Writer<V>
- 
Field SummaryFields inherited from class org.elasticsearch.action.support.master.AcknowledgedRequestDEFAULT_ACK_TIMEOUT, timeoutFields inherited from class org.elasticsearch.action.support.master.MasterNodeRequestDEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeoutFields inherited from interface org.elasticsearch.xcontent.ToXContentEMPTY_PARAMS
- 
Constructor SummaryConstructorsConstructorDescriptionPutRepositoryRequest(String name) Constructs a new put repository request with the provided name.
- 
Method SummaryModifier and TypeMethodDescriptionname()The name of the repository.Sets the name of the repository.settings()Returns repository settingssettings(String source, XContentType xContentType) Sets the repository settings.Sets the repository settings.Sets the repository settingssettings(Settings.Builder settings) Sets the repository settingsParses repository definition.toXContent(XContentBuilder builder, ToXContent.Params params) type()Returns repository typeThe type of the repository "fs" - shared filesystem repositoryvalidate()booleanverify()Returns true if repository should be verified after creationverify(boolean verify) Sets whether or not the repository should be verified after creationvoidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.master.AcknowledgedRequestackTimeout, timeout, timeout, timeoutMethods inherited from class org.elasticsearch.action.support.master.MasterNodeRequestmasterNodeTimeout, masterNodeTimeout, masterNodeTimeoutMethods inherited from class org.elasticsearch.action.ActionRequestgetShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequestgetParentTask, setParentTask, toStringMethods inherited from class org.elasticsearch.transport.TransportMessagedecRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.ack.AckedRequestmasterNodeTimeoutMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequestcreateTask, getDescription, setParentTaskMethods inherited from interface org.elasticsearch.xcontent.ToXContentObjectisFragment
- 
Constructor Details- 
PutRepositoryRequest- Throws:
- IOException
 
- 
PutRepositoryRequestpublic PutRepositoryRequest()
- 
PutRepositoryRequestConstructs a new put repository request with the provided name.
 
- 
- 
Method Details- 
validate- Specified by:
- validatein class- ActionRequest
 
- 
nameSets the name of the repository.- Parameters:
- name- repository name
 
- 
nameThe name of the repository.- Returns:
- repository name
 
- 
typeThe type of the repository- "fs" - shared filesystem repository
 - Parameters:
- type- repository type
- Returns:
- this request
 
- 
typeReturns repository type- Returns:
- repository type
 
- 
settingsSets the repository settings- Parameters:
- settings- repository settings
- Returns:
- this request
 
- 
settingsSets the repository settings- Parameters:
- settings- repository settings
- Returns:
- this request
 
- 
settingsSets the repository settings.- Parameters:
- source- repository settings in json or yaml format
- xContentType- the content type of the source
- Returns:
- this request
 
- 
settingsSets the repository settings.- Parameters:
- source- repository settings
- Returns:
- this request
 
- 
settingsReturns repository settings- Returns:
- repository settings
 
- 
verifySets whether or not the repository should be verified after creation
- 
verifypublic boolean verify()Returns true if repository should be verified after creation
- 
sourceParses repository definition.- Parameters:
- repositoryDefinition- repository definition
 
- 
writeToDescription copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
- writeToin interface- Writeable
- Overrides:
- writeToin class- AcknowledgedRequest<PutRepositoryRequest>
- Throws:
- IOException
 
- 
toXContentpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
- toXContentin interface- ToXContent
- Throws:
- IOException
 
 
-