类 GetAliasesResponse
java.lang.Object
org.easysearch.client.GetAliasesResponse
- 所有已实现的接口:
org.easysearch.common.xcontent.StatusToXContentObject,org.easysearch.common.xcontent.ToXContent,org.easysearch.common.xcontent.ToXContentObject
public class GetAliasesResponse
extends java.lang.Object
implements org.easysearch.common.xcontent.StatusToXContentObject
Response obtained from the get aliases API.
The format is pretty horrible as it holds aliases, but at the same time errors can come back through the status and error fields.
Such errors are mostly 404 - NOT FOUND for aliases that were specified but not found. In such case the client won't throw exception
so it allows to retrieve the returned aliases, while at the same time checking if errors were returned.
There's also the case where an exception is returned, like for instance an
IndexNotFoundException.
We would usually throw such exception, but we configure the client to not throw for 404 to support the case above, hence we also not
throw in case an index is not found, although it is a hard error that doesn't come back with aliases.-
嵌套类概要
从接口继承的嵌套类/接口 org.easysearch.common.xcontent.ToXContent
org.easysearch.common.xcontent.ToXContent.DelegatingMapParams, org.easysearch.common.xcontent.ToXContent.MapParams, org.easysearch.common.xcontent.ToXContent.Params -
字段概要
从接口继承的字段 org.easysearch.common.xcontent.ToXContent
EMPTY_PARAMS -
方法概要
修饰符和类型 方法 说明 static GetAliasesResponsefromXContent(org.easysearch.common.xcontent.XContentParser parser)Parse the get aliases responsejava.util.Map<java.lang.String,java.util.Set<org.easysearch.cluster.metadata.AliasMetadata>>getAliases()Return the requested aliasesjava.lang.StringgetError()Return the possibly returned error, null otherwiseorg.easysearch.EasysearchExceptiongetException()Return the exception that may have been returnedorg.easysearch.rest.RestStatusstatus()org.easysearch.common.xcontent.XContentBuildertoXContent(org.easysearch.common.xcontent.XContentBuilder builder, org.easysearch.common.xcontent.ToXContent.Params params)从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.easysearch.common.xcontent.ToXContentObject
isFragment
-
方法详细资料
-
status
public org.easysearch.rest.RestStatus status()- 指定者:
status在接口中org.easysearch.common.xcontent.StatusToXContentObject
-
getError
public java.lang.String getError()Return the possibly returned error, null otherwise -
getException
public org.easysearch.EasysearchException getException()Return the exception that may have been returned -
getAliases
public java.util.Map<java.lang.String,java.util.Set<org.easysearch.cluster.metadata.AliasMetadata>> getAliases()Return the requested aliases -
toXContent
public org.easysearch.common.xcontent.XContentBuilder toXContent(org.easysearch.common.xcontent.XContentBuilder builder, org.easysearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- 指定者:
toXContent在接口中org.easysearch.common.xcontent.ToXContent- 抛出:
java.io.IOException
-
fromXContent
public static GetAliasesResponse fromXContent(org.easysearch.common.xcontent.XContentParser parser) throws java.io.IOExceptionParse the get aliases response- 抛出:
java.io.IOException
-