Class: Mongo::Retryable::BaseWorker Private

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
build/ruby-driver-v2.19/lib/mongo/retryable/base_worker.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

The abstract superclass for workers employed by Mongo::Retryable.

Since:

  • 2.1.0

Direct Known Subclasses

ReadWorker, WriteWorker

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(retryable) ⇒ BaseWorker

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Constructs a new worker.

Examples:

Instantiating a new read worker

worker = Mongo::Retryable::ReadWorker.new(self)

Instantiating a new write worker

worker = Mongo::Retryable::WriteWorker.new(self)

Parameters:

  • retryable (Mongo::Retryable)

    The client object that is using this worker to perform a retryable operation

Since:

  • 2.1.0



46
47
48
# File 'build/ruby-driver-v2.19/lib/mongo/retryable/base_worker.rb', line 46

def initialize(retryable)
  @retryable = retryable
end

Instance Attribute Details

#retryableMongo::Retryable (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns retryable A reference to the client object that instatiated this worker.

Returns:

  • (Mongo::Retryable)

    retryable A reference to the client object that instatiated this worker.

Since:

  • 2.1.0



34
35
36
# File 'build/ruby-driver-v2.19/lib/mongo/retryable/base_worker.rb', line 34

def retryable
  @retryable
end