RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Classes | Public Types | Public Member Functions
Redis::AsyncConnection Struct Reference

#include <redis.h>

List of all members.

Classes

struct  EventLoop
struct  MultiAggregator
struct  RequestData
struct  Timeout

Public Types

typedef boost::function< void(const
Result &)> 
OnResult
typedef boost::function< void(const
Results &)> 
OnResults

Public Member Functions

 AsyncConnection (const Address &address)
void connect (const Address &address)
void test ()
void close ()
int64_t queue (const Command &command, const OnResult &onResult=OnResult(), Timeout timeout=Timeout())
Result exec (const Command &command, Timeout timeout=Timeout())
void queueMulti (const std::vector< Command > &commands, const OnResults &onResults=OnResults(), Timeout timeout=Timeout())
Results execMulti (const std::vector< Command > &command, Timeout timeout=Timeout())
void cancel (int handle)
size_t numRequestsPending () const
size_t numTimeoutsPending () const

Detailed Description

Asynchronous connection to Redis.

Definition at line 354 of file redis.h.


Member Function Documentation

void Redis::AsyncConnection::cancel ( int  handle)

Cancel the given command.

Definition at line 1014 of file redis.cc.

Result Redis::AsyncConnection::exec ( const Command command,
Timeout  timeout = Timeout() 
)

Execute synchronously.

Definition at line 917 of file redis.cc.

Results Redis::AsyncConnection::execMulti ( const std::vector< Command > &  command,
Timeout  timeout = Timeout() 
)

Execute multiple commands synchronously.

Definition at line 992 of file redis.cc.

int64_t Redis::AsyncConnection::queue ( const Command command,
const OnResult &  onResult = OnResult(),
Timeout  timeout = Timeout() 
)

Queue an asynchronous command with a timeout. Returns a handle that can be used to cancel the command (which means ignore the result).

Definition at line 850 of file redis.cc.

void Redis::AsyncConnection::queueMulti ( const std::vector< Command > &  commands,
const OnResults &  onResults = OnResults(),
Timeout  timeout = Timeout() 
)

Queue a list of asynchronous commands atomically with a timeout.

Definition at line 967 of file redis.cc.

Test the connection by sending a ping and waiting for the response. This is synchronous. Once this method returns, it is sure that the connection works.

Definition at line 735 of file redis.cc.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator