public class GetIndexedScriptRequest extends ActionRequest<GetIndexedScriptRequest> implements IndicesRequest
scriptLang(String)
and id(String)
to be set.GetIndexedScriptResponse
TransportRequest.Empty
IndicesRequest.Replaceable
Modifier and Type | Field and Description |
---|---|
protected String |
id |
protected String |
scriptLang |
headers
Constructor and Description |
---|
GetIndexedScriptRequest()
Constructs a new get request against the script index.
|
GetIndexedScriptRequest(String scriptLang,
String id)
Constructs a new get request against the script index with the type and id.
|
Modifier and Type | Method and Description |
---|---|
String |
id() |
GetIndexedScriptRequest |
id(String id)
Sets the id of the script to fetch.
|
String[] |
indices()
Returns the array of indices that the action relates to
|
IndicesOptions |
indicesOptions()
Returns the indices options used to resolve indices.
|
void |
readFrom(StreamInput in) |
String |
scriptLang() |
GetIndexedScriptRequest |
scriptLang(String type)
Sets the language of the script to fetch.
|
String |
toString() |
ActionRequestValidationException |
validate() |
long |
version()
Sets the version, which will cause the get operation to only be performed if a matching
version exists and no changes happened on the doc since then.
|
GetIndexedScriptRequest |
version(long version) |
VersionType |
versionType() |
GetIndexedScriptRequest |
versionType(VersionType versionType)
Sets the versioning type.
|
void |
writeTo(StreamOutput out) |
createTask, getDescription
remoteAddress, remoteAddress
contextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContext
public GetIndexedScriptRequest()
scriptLang(String)
and id(String)
must be set.public ActionRequestValidationException validate()
validate
in class ActionRequest<GetIndexedScriptRequest>
public String[] indices()
IndicesRequest
indices
in interface IndicesRequest
public IndicesOptions indicesOptions()
IndicesRequest
indicesOptions
in interface IndicesRequest
public GetIndexedScriptRequest scriptLang(@Nullable String type)
public GetIndexedScriptRequest id(String id)
public String scriptLang()
public String id()
public long version()
public GetIndexedScriptRequest version(long version)
public GetIndexedScriptRequest versionType(VersionType versionType)
VersionType.INTERNAL
.public VersionType versionType()
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class ActionRequest<GetIndexedScriptRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class ActionRequest<GetIndexedScriptRequest>
IOException
Copyright © 2009–2016. All rights reserved.