Module org.elasticsearch.xcore
Class ExecuteWatchRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.LegacyActionRequest
org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchRequest
- All Implemented Interfaces:
Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest
A request to execute a watch by id
-
Nested Class Summary
Nested 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.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptiongetId()org.elasticsearch.xcontent.XContentTypebooleanisDebug()booleanbooleanvoidsetActionMode(String actionId, ActionExecutionMode actionMode) Sets the action execution mode for the give action (identified by its id).voidsetAlternativeInput(Map<String, Object> alternativeInput) voidsetDebug(boolean debug) voidSets the id of the watch to be executedvoidsetIgnoreCondition(boolean ignoreCondition) voidsetRecordExecution(boolean recordExecution) voidsetTriggerData(Map<String, Object> data) voidsetTriggerEvent(TriggerEvent event) voidsetWatchSource(BytesReference watchSource, org.elasticsearch.xcontent.XContentType xContentType) voidsetWatchSource(WatchSourceBuilder watchSource) toString()validate()voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, getRequestId, setParentTask, setRequestIdMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
mustIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Field Details
-
INLINE_WATCH_ID
- See Also:
-
-
Constructor Details
-
ExecuteWatchRequest
public ExecuteWatchRequest() -
ExecuteWatchRequest
- Parameters:
id- the id of the watch to execute
-
ExecuteWatchRequest
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classActionRequest- Throws:
IOException
-
getId
- Returns:
- The id of the watch to be executed
-
setId
Sets the id of the watch to be executed -
isIgnoreCondition
public boolean isIgnoreCondition()- Returns:
- Should the condition for this execution be ignored
-
setIgnoreCondition
public void setIgnoreCondition(boolean ignoreCondition) - Parameters:
ignoreCondition- set if the condition for this execution be ignored
-
isRecordExecution
public boolean isRecordExecution()- Returns:
- Should this execution be recorded in the history index
-
setRecordExecution
public void setRecordExecution(boolean recordExecution) - Parameters:
recordExecution- Sets if this execution be recorded in the history index
-
getAlternativeInput
- Returns:
- The alertnative input to use (may be null)
-
setAlternativeInput
- Parameters:
alternativeInput- Set's the alernative input
-
setTriggerData
- Parameters:
data- The data that should be associated with the trigger event.- Throws:
IOException
-
setTriggerEvent
- Parameters:
event- the trigger event to use- Throws:
IOException
-
getTriggerData
- Returns:
- the trigger to use
-
getWatchSource
- Returns:
- the source of the watch to execute
-
getXContentType
public org.elasticsearch.xcontent.XContentType getXContentType() -
setWatchSource
public void setWatchSource(BytesReference watchSource, org.elasticsearch.xcontent.XContentType xContentType) - Parameters:
watchSource- instead of using an existing watch use this non persisted watch
-
setWatchSource
- Parameters:
watchSource- instead of using an existing watch use this non persisted watch
-
getActionModes
- Returns:
- the execution modes for the actions. These modes determine the nature of the execution of the watch actions while the watch is executing.
-
setActionMode
Sets the action execution mode for the give action (identified by its id).- Parameters:
actionId- the action id.actionMode- the execution mode of the action.
-
isDebug
public boolean isDebug()- Returns:
- whether the watch should execute in debug mode. In debug mode the execution
varswill be returned as part of the watch record.
-
setDebug
public void setDebug(boolean debug) - Parameters:
debug- indicates whether the watch should execute in debug mode. In debug mode the returned watch record will hold the executionvars
-
validate
- Specified by:
validatein classActionRequest
-
toString
- Overrides:
toStringin classTransportRequest
-