Class Watch

  • All Implemented Interfaces:
    com.floragunn.searchsupport.jobs.config.JobConfig, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

    public class Watch
    extends WatchElement
    implements com.floragunn.searchsupport.jobs.config.JobConfig, org.elasticsearch.common.xcontent.ToXContentObject
    • Field Detail

      • WITHOUT_AUTH_TOKEN_PARAM_MAP

        public static Map<String,​String> WITHOUT_AUTH_TOKEN_PARAM_MAP
      • WITHOUT_AUTH_TOKEN

        public static final org.elasticsearch.common.xcontent.ToXContent.Params WITHOUT_AUTH_TOKEN
      • WITHOUT_META_AND_ACTIVE

        public static final org.elasticsearch.common.xcontent.ToXContent.Params WITHOUT_META_AND_ACTIVE
      • throttlePeriod

        protected com.floragunn.searchsupport.util.duration.DurationExpression throttlePeriod
    • Method Detail

      • getId

        public String getId()
      • getJobKey

        public org.quartz.JobKey getJobKey()
        Specified by:
        getJobKey in interface com.floragunn.searchsupport.jobs.config.JobConfig
      • getDescription

        public String getDescription()
        Specified by:
        getDescription in interface com.floragunn.searchsupport.jobs.config.JobConfig
      • getJobClass

        public Class<? extends org.quartz.Job> getJobClass()
        Specified by:
        getJobClass in interface com.floragunn.searchsupport.jobs.config.JobConfig
      • getJobDataMap

        public Map<String,​Object> getJobDataMap()
        Specified by:
        getJobDataMap in interface com.floragunn.searchsupport.jobs.config.JobConfig
      • isDurable

        public boolean isDurable()
        Specified by:
        isDurable in interface com.floragunn.searchsupport.jobs.config.JobConfig
      • getTriggers

        public List<org.quartz.Trigger> getTriggers()
        Specified by:
        getTriggers in interface com.floragunn.searchsupport.jobs.config.JobConfig
      • getNonGeneratedResolveActions

        public List<ResolveAction> getNonGeneratedResolveActions()
      • getVersion

        public long getVersion()
        Specified by:
        getVersion in interface com.floragunn.searchsupport.jobs.config.JobConfig
      • toJson

        public String toJson()
      • toJsonWithoutAuthToken

        public String toJsonWithoutAuthToken()
      • toJsonWithoutMetaAndActive

        public String toJsonWithoutMetaAndActive()
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.floragunn.searchsupport.jobs.config.JobConfig
        Overrides:
        hashCode in class Object
      • secureHash

        public String secureHash()
      • getIdAndHash

        public String getIdAndHash()
      • getSecureAuthTokenAudience

        public String getSecureAuthTokenAudience()
        Specified by:
        getSecureAuthTokenAudience in interface com.floragunn.searchsupport.jobs.config.JobConfig
      • toXContent

        public org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder,
                                                                            org.elasticsearch.common.xcontent.ToXContent.Params params)
                                                                     throws IOException
        Specified by:
        toXContent in interface org.elasticsearch.common.xcontent.ToXContent
        Throws:
        IOException
      • getThrottlePeriod

        public com.floragunn.searchsupport.util.duration.DurationExpression getThrottlePeriod()
      • isActive

        public boolean isActive()
      • setActive

        public void setActive​(boolean active)
      • isLogRuntimeData

        public boolean isLogRuntimeData()
      • setLogRuntimeData

        public void setLogRuntimeData​(boolean logRuntimeData)
      • getTenant

        public String getTenant()
      • setTenant

        public void setTenant​(String tenant)
      • setSeverityMapping

        public void setSeverityMapping​(SeverityMapping severityMapping)
      • setResolveActions

        public void setResolveActions​(List<ResolveAction> resolveActions)
      • getAuthToken

        public String getAuthToken()
        Specified by:
        getAuthToken in interface com.floragunn.searchsupport.jobs.config.JobConfig
      • getSchedule

        public com.floragunn.searchsupport.jobs.config.schedule.Schedule getSchedule()
      • setSchedule

        public void setSchedule​(com.floragunn.searchsupport.jobs.config.schedule.Schedule schedule)
      • setDescription

        public void setDescription​(String description)
      • parse

        public static Watch parse​(WatchInitializationService ctx,
                                  String tenant,
                                  String id,
                                  String json,
                                  long version)
                           throws com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
        Throws:
        com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
      • parseFromElasticDocument

        public static Watch parseFromElasticDocument​(WatchInitializationService ctx,
                                                     String tenant,
                                                     String id,
                                                     String json,
                                                     long version)
                                              throws com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
        Throws:
        com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
      • parse

        public static Watch parse​(WatchInitializationService ctx,
                                  String tenant,
                                  String id,
                                  com.fasterxml.jackson.databind.JsonNode jsonNode)
                           throws com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
        Throws:
        com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
      • parse

        public static Watch parse​(WatchInitializationService ctx,
                                  String tenant,
                                  String id,
                                  com.fasterxml.jackson.databind.JsonNode jsonNode,
                                  long version)
                           throws com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
        Throws:
        com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
      • createJobKey

        public static org.quartz.JobKey createJobKey​(String id)