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.EmptyNested 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.ParamsNested 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
FieldsFields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionAcquireLockRequest(String jobId, String jobIndexName, long lockDurationSeconds) Instantiates a new AcquireLockRequestAcquireLockRequest(org.opensearch.core.common.io.stream.StreamInput in) Instantiates a new AcquireLockRequest fromStreamInput -
Method Summary
Modifier and TypeMethodDescriptiongetJobId()longstatic AcquireLockRequestparse(org.opensearch.core.xcontent.XContentParser parser) org.opensearch.core.xcontent.XContentBuildertoXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) org.opensearch.action.ActionRequestValidationExceptionvalidate()voidwriteTo(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class org.opensearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.opensearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.opensearch.core.transport.TransportMessage
remoteAddress, remoteAddressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTaskMethods inherited from interface org.opensearch.core.xcontent.ToXContentObject
isFragment
-
Field Details
-
JOB_ID
- See Also:
-
JOB_INDEX_NAME
- See Also:
-
LOCK_DURATION_SECONDS
- See Also:
-
-
Constructor Details
-
AcquireLockRequest
Instantiates a new AcquireLockRequest- Parameters:
jobId- the id of the job in which the lock will be given tojobIndexName- the name of the job indexlockDurationSeconds- the duration for which this lock will be acquired
-
AcquireLockRequest
Instantiates a new AcquireLockRequest fromStreamInput- Parameters:
in- is the byte stream input used to de-serialize the message.- Throws:
IOException- IOException when message de-serialization fails.
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceorg.opensearch.core.common.io.stream.Writeable- Overrides:
writeToin classorg.opensearch.action.ActionRequest- Throws:
IOException
-
getJobId
-
getJobIndexName
-
getLockDurationSeconds
public long getLockDurationSeconds() -
validate
public org.opensearch.action.ActionRequestValidationException validate()- Specified by:
validatein classorg.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:
toXContentin interfaceorg.opensearch.core.xcontent.ToXContent- Throws:
IOException
-