java.lang.Object
org.elasticsearch.xpack.core.watcher.watch.WatchStatus
- All Implemented Interfaces:
Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionWatchStatus(long version, WatchStatus.State state, ExecutionState executionState, ZonedDateTime lastChecked, ZonedDateTime lastMetCondition, Map<String, ActionStatus> actions, Map<String, String> headers) WatchStatus(ZonedDateTime now, Map<String, ActionStatus> actions) -
Method Summary
Modifier and TypeMethodDescriptionactionStatus(String actionId) booleanchecked()booleaninthashCode()voidonActionResult(String actionId, ZonedDateTime timestamp, Action.Result result) voidonCheck(boolean metCondition, ZonedDateTime timestamp) Called whenever an watch is checked, ie.static WatchStatusparse(String watchId, WatcherXContentParser parser) voidsetExecutionState(ExecutionState executionState) voidsetHeaders(Map<String, String> headers) state()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) longversion()voidversion(long version) voidwriteTo(StreamOutput out) 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_STATE
- See Also:
-
-
Constructor Details
-
WatchStatus
- Throws:
IOException
-
WatchStatus
-
WatchStatus
public WatchStatus(long version, WatchStatus.State state, ExecutionState executionState, ZonedDateTime lastChecked, ZonedDateTime lastMetCondition, Map<String, ActionStatus> actions, Map<String, String> headers)
-
-
Method Details
-
state
-
checked
public boolean checked() -
lastChecked
-
lastMetCondition
-
actionStatus
-
version
public long version() -
version
public void version(long version) -
setExecutionState
-
getExecutionState
-
getHeaders
-
setHeaders
-
equals
-
hashCode
public int hashCode() -
onCheck
Called whenever an watch is checked, ie. the condition of the watch is evaluated to see if the watch should be executed.- Parameters:
metCondition- indicates whether the watch's condition was met.
-
onActionResult
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
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
-
parse
- Throws:
IOException
-