Class AcquireLockRequest

java.lang.Object
org.opensearch.core.transport.TransportMessage
org.opensearch.transport.TransportRequest
org.opensearch.action.ActionRequest
org.opensearch.jobscheduler.transport.AcquireLockRequest
All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, org.opensearch.core.xcontent.ToXContentObject, org.opensearch.tasks.TaskAwareRequest

public class AcquireLockRequest extends org.opensearch.action.ActionRequest implements org.opensearch.core.xcontent.ToXContentObject
Request from extensions to acquire a lock for scheduled job execution
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.opensearch.transport.TransportRequest

    org.opensearch.transport.TransportRequest.Empty

    Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent

    org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable

    org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     

    Fields inherited from interface org.opensearch.core.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    AcquireLockRequest(String jobId, String jobIndexName, long lockDurationSeconds)
    Instantiates a new AcquireLockRequest
    AcquireLockRequest(org.opensearch.core.common.io.stream.StreamInput in)
    Instantiates a new AcquireLockRequest from StreamInput
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    long
     
    parse(org.opensearch.core.xcontent.XContentParser parser)
     
    org.opensearch.core.xcontent.XContentBuilder
    toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params)
     
    org.opensearch.action.ActionRequestValidationException
     
    void
    writeTo(org.opensearch.core.common.io.stream.StreamOutput out)
     

    Methods inherited from class org.opensearch.action.ActionRequest

    getShouldStoreResult

    Methods inherited from class org.opensearch.transport.TransportRequest

    getParentTask, setParentTask

    Methods inherited from class org.opensearch.core.transport.TransportMessage

    remoteAddress, remoteAddress

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.opensearch.tasks.TaskAwareRequest

    createTask, getDescription, setParentTask

    Methods inherited from interface org.opensearch.core.xcontent.ToXContentObject

    isFragment
  • Field Details

  • Constructor Details

    • AcquireLockRequest

      public AcquireLockRequest(String jobId, String jobIndexName, long lockDurationSeconds)
      Instantiates a new AcquireLockRequest
      Parameters:
      jobId - the id of the job in which the lock will be given to
      jobIndexName - the name of the job index
      lockDurationSeconds - the duration for which this lock will be acquired
    • AcquireLockRequest

      public AcquireLockRequest(org.opensearch.core.common.io.stream.StreamInput in) throws IOException
      Instantiates a new AcquireLockRequest from StreamInput
      Parameters:
      in - is the byte stream input used to de-serialize the message.
      Throws:
      IOException - IOException when message de-serialization fails.
  • Method Details

    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Overrides:
      writeTo in class org.opensearch.action.ActionRequest
      Throws:
      IOException
    • getJobId

      public String getJobId()
    • getJobIndexName

      public String getJobIndexName()
    • getLockDurationSeconds

      public long getLockDurationSeconds()
    • validate

      public org.opensearch.action.ActionRequestValidationException validate()
      Specified by:
      validate in class org.opensearch.action.ActionRequest
    • parse

      public static AcquireLockRequest parse(org.opensearch.core.xcontent.XContentParser parser) throws IOException
      Throws:
      IOException
    • toXContent

      public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.opensearch.core.xcontent.ToXContent
      Throws:
      IOException