Class: Operaton::Bpm::Client::Topic::Impl::Dto::FetchAndLockRequestDto
- Inherits:
-
Impl::RequestDto
- Object
- Impl::RequestDto
- Operaton::Bpm::Client::Topic::Impl::Dto::FetchAndLockRequestDto
- Defined in:
- lib/operaton/bpm/client/topic/impl/dto/fetch_and_lock_request_dto.rb
Overview
Mirrors org.operaton.bpm.client.topic.impl.dto.FetchAndLockRequestDto (annotated @JsonInclude(NON_NULL) in Java — nil fields are omitted).
Instance Attribute Summary collapse
-
#async_response_timeout ⇒ Object
readonly
Returns the value of attribute async_response_timeout.
-
#max_tasks ⇒ Object
readonly
Returns the value of attribute max_tasks.
-
#sorting ⇒ Object
readonly
Returns the value of attribute sorting.
-
#topics ⇒ Object
readonly
Returns the value of attribute topics.
Attributes inherited from Impl::RequestDto
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(worker_id, max_tasks, async_response_timeout, topics, use_priority = true, ordering_config = Task::OrderingConfig.empty) ⇒ FetchAndLockRequestDto
constructor
A new instance of FetchAndLockRequestDto.
- #use_priority? ⇒ Boolean
Constructor Details
#initialize(worker_id, max_tasks, async_response_timeout, topics, use_priority = true, ordering_config = Task::OrderingConfig.empty) ⇒ FetchAndLockRequestDto
Returns a new instance of FetchAndLockRequestDto.
17 18 19 20 21 22 23 24 25 |
# File 'lib/operaton/bpm/client/topic/impl/dto/fetch_and_lock_request_dto.rb', line 17 def initialize(worker_id, max_tasks, async_response_timeout, topics, use_priority = true, ordering_config = Task::OrderingConfig.empty) super(worker_id) @max_tasks = max_tasks @use_priority = use_priority @async_response_timeout = async_response_timeout @topics = topics @sorting = ordering_config.to_sorting_dtos end |
Instance Attribute Details
#async_response_timeout ⇒ Object (readonly)
Returns the value of attribute async_response_timeout.
15 16 17 |
# File 'lib/operaton/bpm/client/topic/impl/dto/fetch_and_lock_request_dto.rb', line 15 def async_response_timeout @async_response_timeout end |
#max_tasks ⇒ Object (readonly)
Returns the value of attribute max_tasks.
15 16 17 |
# File 'lib/operaton/bpm/client/topic/impl/dto/fetch_and_lock_request_dto.rb', line 15 def max_tasks @max_tasks end |
#sorting ⇒ Object (readonly)
Returns the value of attribute sorting.
15 16 17 |
# File 'lib/operaton/bpm/client/topic/impl/dto/fetch_and_lock_request_dto.rb', line 15 def sorting @sorting end |
#topics ⇒ Object (readonly)
Returns the value of attribute topics.
15 16 17 |
# File 'lib/operaton/bpm/client/topic/impl/dto/fetch_and_lock_request_dto.rb', line 15 def topics @topics end |
Instance Method Details
#as_json ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/operaton/bpm/client/topic/impl/dto/fetch_and_lock_request_dto.rb', line 31 def as_json json = super.merge( "maxTasks" => max_tasks, "usePriority" => use_priority?, "asyncResponseTimeout" => async_response_timeout, "topics" => topics.map(&:as_json), "sorting" => sorting.map(&:as_json) ) json.compact end |
#use_priority? ⇒ Boolean
27 28 29 |
# File 'lib/operaton/bpm/client/topic/impl/dto/fetch_and_lock_request_dto.rb', line 27 def use_priority? @use_priority end |