123456789_123456789_123456789_123456789_123456789_

Class: TestConnection Private

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
Inherits: Object
Defined in: lib/em/protocols/memcache.rb

Constant Summary

Deferrable - Included

Pool

Protocols::Memcache - Included

Cdeleted, Cdelimiter, Cempty, Cend, Cerror, Cstored, Cunknown

Class Method Summary

Instance Method Summary

Protocols::Memcache - Included

#connection_completed,
#del
#delete

Delete the value associated with a key.

#get

Get the value associated with one or multiple keys.

#get_hash

Gets multiple values as a hash.

#initialize, #process_cmd, #receive_data,
#set

Set the value for a given key.

#unbind, #send_cmd

Deferrable - Included

#callback

Specify a block to be executed if and when the Deferrable object receives a status of :succeeded.

#cancel_callback

Cancels an outstanding callback to &block if any.

#cancel_errback

Cancels an outstanding errback to &block if any.

#cancel_timeout

Cancels an outstanding timeout if any.

#errback

Specify a block to be executed if and when the Deferrable object receives a status of :failed.

#fail

Sugar for set_deferred_status(:failed, ...).

#set_deferred_failure
#set_deferred_status

Sets the "disposition" (status) of the Deferrable object.

#set_deferred_success
#succeed

Sugar for set_deferred_status(:succeeded, ...).

#timeout

Setting a timeout on a Deferrable causes it to go into the failed state after the Timeout expires (passing no arguments to the object's errbacks).

Constructor Details

.newTestConnection

[ GitHub ]

  
# File 'lib/em/protocols/memcache.rb', line 249

def initialize
  connection_completed
end

Instance Method Details

#send_data(data)

[ GitHub ]

  
# File 'lib/em/protocols/memcache.rb', line 242

def send_data data
  sent_data << data
end

#sent_data

[ GitHub ]

  
# File 'lib/em/protocols/memcache.rb', line 245

def sent_data
  @sent_data ||= ''
end