类 PutWatchRequest
java.lang.Object
org.easysearch.client.watcher.PutWatchRequest
- 所有已实现的接口:
Validatable
public final class PutWatchRequest extends java.lang.Object implements Validatable
This request class contains the data needed to create a watch along with the name of the watch.
The name of the watch will become the ID of the indexed document.
-
字段概要
从接口继承的字段 org.easysearch.client.Validatable
EMPTY -
构造器概要
构造器 构造器 说明 PutWatchRequest(java.lang.String id, org.easysearch.common.bytes.BytesReference source, org.easysearch.common.xcontent.XContentType xContentType) -
方法概要
修饰符和类型 方法 说明 java.lang.StringgetId()org.easysearch.common.bytes.BytesReferencegetSource()longifPrimaryTerm()If set, only perform this put watch request if the watch's last modification was assigned this primary term.longifSeqNo()If set, only perform this put watch request if the watch's last modification was assigned this sequence number.booleanisActive()static booleanisValidId(java.lang.String id)voidsetActive(boolean active)Sets the initial active state of the watchPutWatchRequestsetIfPrimaryTerm(long term)only performs this put request if the watch's last modification was assigned the given primary term.PutWatchRequestsetIfSeqNo(long seqNo)only performs this put request if the watch's last modification was assigned the given sequence number.org.easysearch.common.xcontent.XContentTypexContentType()Get the content type for the source从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.easysearch.client.Validatable
validate
-
构造器详细资料
-
PutWatchRequest
public PutWatchRequest(java.lang.String id, org.easysearch.common.bytes.BytesReference source, org.easysearch.common.xcontent.XContentType xContentType)
-
-
方法详细资料
-
getId
public java.lang.String getId()- 返回:
- The name that will be the ID of the indexed document
-
getSource
public org.easysearch.common.bytes.BytesReference getSource()- 返回:
- The source of the watch
-
isActive
public boolean isActive()- 返回:
- The initial active state of the watch (defaults to
true, e.g. "active")
-
setActive
public void setActive(boolean active)Sets the initial active state of the watch -
xContentType
public org.easysearch.common.xcontent.XContentType xContentType()Get the content type for the source -
setIfSeqNo
only performs this put request if the watch's last modification was assigned the given sequence number. Must be used in combination withsetIfPrimaryTerm(long)If the watch's last modification was assigned a different sequence number aVersionConflictEngineExceptionwill be thrown. -
setIfPrimaryTerm
only performs this put request if the watch's last modification was assigned the given primary term. Must be used in combination withsetIfSeqNo(long)If the watch last modification was assigned a different term aVersionConflictEngineExceptionwill be thrown. -
ifSeqNo
public long ifSeqNo()If set, only perform this put watch request if the watch's last modification was assigned this sequence number. If the watch last last modification was assigned a different sequence number aVersionConflictEngineExceptionwill be thrown. -
ifPrimaryTerm
public long ifPrimaryTerm()If set, only perform this put watch request if the watch's last modification was assigned this primary term. If the watch's last modification was assigned a different term aVersionConflictEngineExceptionwill be thrown. -
isValidId
public static boolean isValidId(java.lang.String id)
-