Class Fog::Rackspace::Queues::Mock::MockClaim
In: lib/fog/rackspace/queues.rb
Parent: Object

Reservation indicating that a consumer is in the process of handling a collection of messages from a queue.

Methods

age   expired?   message_end_of_life   messages   new   to_h   touch!  

Attributes

grace  [RW] 
id  [RW] 
queue  [RW] 
ttl  [RW] 

Public Class methods

Create a new MockClaim. Clients should use {MockQueue#add_claim} instead.

@param queue [MockQueue] The queue that owns this claim. @param ttl [Integer] Duration, in seconds, that this queue should last. @param grace [Integer] Extra life granted to messages within this claim after this

  claim expires, to give another consumer a chance to process it.

Public Instance methods

Determine how long ago this claim was created, in seconds.

@return [Integer]

Determine if this claim has lasted longer than its designated ttl.

@return [Boolean]

Calculate the time at which messages belonging to this claim should expire.

@return [Integer] Seconds since the epoch.

Access the collection of messages owned by this claim.

@return [Array<Message>]

Convert this claim into a GET payload.

@return [Hash]

Set or reset the creation time of the claim to the present.

[Validate]