Class: Mammoth::DeliveryProgressCoordinator::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/mammoth/delivery_progress_coordinator.rb

Overview

Mutable completion state for one registered work item.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(work:, source_position:, completed:) ⇒ Entry

Returns a new instance of Entry.

Parameters:

  • work (Object)

    registered work

  • source_position (String, Integer, nil)

    upstream position

  • completed (Boolean)

    whether a durable outcome was recorded



32
33
34
35
36
# File 'lib/mammoth/delivery_progress_coordinator.rb', line 32

def initialize(work:, source_position:, completed:)
  @work = work
  @source_position = source_position
  @completed = completed
end

Instance Attribute Details

#completedObject

Returns the value of attribute completed.



27
28
29
# File 'lib/mammoth/delivery_progress_coordinator.rb', line 27

def completed
  @completed
end

#source_positionObject (readonly)

Returns the value of attribute source_position.



26
27
28
# File 'lib/mammoth/delivery_progress_coordinator.rb', line 26

def source_position
  @source_position
end

#workObject (readonly)

Returns the value of attribute work.



26
27
28
# File 'lib/mammoth/delivery_progress_coordinator.rb', line 26

def work
  @work
end