All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
redis.client.BasePipeline Class Reference
Inheritance diagram for redis.client.BasePipeline:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __del__
def __enter__
def __exit__
def __init__
def execute
def execute_command
def immediate_execute_command
def load_scripts
def multi
def parse_response
def pipeline_execute_command
def reset
def script_load_for_pipeline
def unwatch
def watch

Public Attributes

 command_stack
 connection
 connection_pool
 explicit_transaction
 response_callbacks
 scripts
 shard_hint
 transaction
 watching

Static Public Attributes

tuple UNWATCH_COMMANDS = set(('DISCARD', 'EXEC', 'UNWATCH'))

Private Member Functions

def _execute_pipeline
def _execute_transaction

Detailed Description

Pipelines provide a way to transmit multiple commands to the Redis server
in one transmission.  This is convenient for batch processing, such as
saving all the values in a list to Redis.

All commands executed within a pipeline are wrapped with MULTI and EXEC
calls. This guarantees all commands executed in the pipeline will be
executed atomically.

Any command raising an exception does *not* halt the execution of
subsequent commands in the pipeline. Instead, the exception is caught
and its instance is placed into the response list returned by execute().
Code iterating over the response list should be able to deal with an
instance of an exception as a potential value. In general, these will be
ResponseError exceptions, such as those raised when issuing a command
on a key of a different datatype.

Definition at line 1506 of file client.py.


Constructor & Destructor Documentation

def redis.client.BasePipeline.__init__ (   self,
  connection_pool,
  response_callbacks,
  transaction,
  shard_hint 
)

Definition at line 1527 of file client.py.

Definition at line 1544 of file client.py.


Member Function Documentation

Definition at line 1538 of file client.py.

def redis.client.BasePipeline.__exit__ (   self,
  exc_type,
  exc_value,
  traceback 
)

Definition at line 1541 of file client.py.

def redis.client.BasePipeline._execute_pipeline (   self,
  connection,
  commands 
) [private]

Definition at line 1665 of file client.py.

def redis.client.BasePipeline._execute_transaction (   self,
  connection,
  commands 
) [private]

Definition at line 1633 of file client.py.

Definition at line 1694 of file client.py.

def redis.client.BasePipeline.execute_command (   self,
  args,
  kwargs 
)

Definition at line 1585 of file client.py.

def redis.client.BasePipeline.immediate_execute_command (   self,
  args,
  options 
)
Execute a command immediately, but don't auto-retry on a
ConnectionError if we're already WATCHing a variable. Used when
issuing WATCH or subsequent commands retrieving their values but before
MULTI is called.

Definition at line 1591 of file client.py.

Definition at line 1683 of file client.py.

Start a transactional block of the pipeline after WATCH commands
are issued. End the transactional block with `execute`.

Definition at line 1573 of file client.py.

def redis.client.BasePipeline.parse_response (   self,
  connection,
  command_name,
  options 
)

Definition at line 1674 of file client.py.

def redis.client.BasePipeline.pipeline_execute_command (   self,
  args,
  options 
)
Stage a command to be executed when execute() is next called

Returns the current Pipeline object back so commands can be
chained together, such as:

pipe = pipe.set('foo', 'bar').incr('baz').decr('bang')

At some other point, you can then run: pipe.execute(),
which will execute all commands queued in the pipe.

Definition at line 1618 of file client.py.

Definition at line 1550 of file client.py.

Definition at line 1741 of file client.py.

Definition at line 1737 of file client.py.

def redis.client.BasePipeline.watch (   self,
  names 
)

Definition at line 1731 of file client.py.


Member Data Documentation

Definition at line 1550 of file client.py.

Definition at line 1527 of file client.py.

Definition at line 1527 of file client.py.

Definition at line 1550 of file client.py.

Definition at line 1527 of file client.py.

Definition at line 1550 of file client.py.

Definition at line 1527 of file client.py.

Definition at line 1527 of file client.py.

tuple redis::client.BasePipeline::UNWATCH_COMMANDS = set(('DISCARD', 'EXEC', 'UNWATCH')) [static]

Definition at line 1525 of file client.py.

Definition at line 1527 of file client.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


redis
Author(s): Daniel Stonier
autogenerated on Tue Jan 15 2013 17:43:13