java.lang.Object
org.elasticsearch.xpack.core.watcher.watch.Watch
- All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionWatch(String id, Trigger trigger, ExecutableInput<? extends Input, ? extends Input.Result> input, ExecutableCondition condition, ExecutableTransform<? extends Transform, ? extends Transform.Result> transform, org.elasticsearch.core.TimeValue throttlePeriod, List<ActionWrapper> actions, Map<String, Object> metadata, WatchStatus status, long sourceSeqNo, long sourcePrimaryTerm) -
Method Summary
Modifier and TypeMethodDescriptionbooleanack(ZonedDateTime now, String... actionIds) Acks this watch.booleanactions()booleanlongThe primary term of the document that was used to create this watch,SequenceNumbers.UNASSIGNED_PRIMARY_TERMif the watch wasn't read from a documentlongThe sequence number of the document that was used to create this watch,SequenceNumbers.UNASSIGNED_SEQ_NOif the watch wasn't read from a documentinthashCode()id()ExecutableInput<? extends Input, ? extends Input.Result> input()metadata()booleansetState(boolean active, ZonedDateTime now) Sets the state of this watch to in/activestatus()org.elasticsearch.core.TimeValueorg.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) ExecutableTransform<? extends Transform, ? extends Transform.Result> trigger()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
INCLUDE_STATUS_KEY
- See Also:
-
INDEX
- See Also:
-
-
Constructor Details
-
Watch
public Watch(String id, Trigger trigger, ExecutableInput<? extends Input, ? extends Input.Result> input, ExecutableCondition condition, @Nullable ExecutableTransform<? extends Transform, ? extends Transform.Result> transform, @Nullable org.elasticsearch.core.TimeValue throttlePeriod, List<ActionWrapper> actions, @Nullable Map<String, Object> metadata, WatchStatus status, long sourceSeqNo, long sourcePrimaryTerm)
-
-
Method Details
-
id
-
trigger
-
input
-
condition
-
transform
-
throttlePeriod
public org.elasticsearch.core.TimeValue throttlePeriod() -
actions
-
metadata
-
status
-
getSourceSeqNo
public long getSourceSeqNo()The sequence number of the document that was used to create this watch,SequenceNumbers.UNASSIGNED_SEQ_NOif the watch wasn't read from a document -
getSourcePrimaryTerm
public long getSourcePrimaryTerm()The primary term of the document that was used to create this watch,SequenceNumbers.UNASSIGNED_PRIMARY_TERMif the watch wasn't read from a document -
setState
Sets the state of this watch to in/active- Returns:
trueif the status of this watch changed,falseotherwise.
-
ack
Acks this watch.- Returns:
trueif the status of this watch changed,falseotherwise.
-
acked
-
equals
-
hashCode
public int hashCode() -
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-