Module Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num NameLoad kwarg body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareGt AttributeLoad NameLoad attr Num body Assign NameStore BinOpMult Call NameLoad AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body TryExcept body While NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If Call AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Continue Break handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Yield Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore Yield Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Raise Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Raise Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num body Return NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad TryExcept body While NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If Call AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If BoolOpAnd CompareNotEq AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If CompareGtE Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str While NameLoad body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Break decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str If BoolOpAnd CompareEq NameLoad Num CompareEq AttributeLoad NameLoad attr Num body Raise Call NameLoad Str Assign NameStore IfExp CompareNotEq NameLoad Num Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Yield ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call NameLoad Num NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Return NameLoad decorator_list decorator_list
N/A N/A tornado.gen N/A tornado.ioloop N/A tornado.locks N/A logging N/A functools collections deque tornadis.client Client tornadis.utils ContextManagerFuture tornadis.exceptions ClientError N/A LOG N/A N/A logging getLogger __name__ ClientPool N/A object N/A N/A High level object to deal with a pool of redis clients. __init__ N/A N/A self max_size client_timeout autoclose N/A -1 -1 False client_kwargs N/A N/A Constructor.

        Args:
            max_size (int): max size of the pool (-1 means "no limit").
            client_timeout (int): timeout in seconds of a connection released
                to the pool (-1 means "no timeout").
            autoclose (boolean): automatically disconnect released connections
                with lifetime > client_timeout (test made every
                client_timeout/10 seconds).
            client_kwargs (dict): Client constructor arguments.
         N/A N/A self max_size max_size N/A N/A self client_timeout client_timeout N/A N/A self client_kwargs client_kwargs N/A N/A self __ioloop N/A N/A client_kwargs get ioloop N/A N/A N/A N/A tornado ioloop IOLoop instance N/A N/A self autoclose autoclose N/A N/A self __pool N/A deque N/A N/A N/A self max_size -1 N/A N/A N/A self __sem N/A N/A N/A tornado locks Semaphore N/A self max_size N/A N/A N/A self __sem None N/A N/A self __autoclose_periodic None N/A N/A N/A self autoclose N/A N/A self client_timeout 0 N/A N/A every N/A N/A int N/A self client_timeout 100 N/A N/A self __autoclose_periodic N/A N/A N/A tornado ioloop PeriodicCallback N/A self _autoclose every io_loop N/A self __ioloop N/A N/A N/A N/A self __autoclose_periodic start N/A _get_client_from_pool_or_make_it N/A N/A self N/A N/A N/A N/A N/A True N/A N/A client N/A N/A N/A self __pool popleft N/A N/A N/A client is_connected N/A N/A N/A N/A self _is_expired_client client N/A N/A N/A N/A client disconnect N/A N/A N/A N/A N/A IndexError N/A N/A client N/A N/A self _make_client N/A N/A True client N/A N/A False client N/A get_connected_client N/A N/A self N/A N/A N/A Gets a connected Client object.

        If max_size is reached, this method will block until a new client
        object is available.

        Returns:
            A Future object with connected Client instance as a result
                (or ClientError if there was a connection problem)
         N/A N/A N/A self __sem None N/A N/A N/A N/A N/A N/A self __sem acquire N/A client None N/A N/A newly_created client N/A N/A self _get_client_from_pool_or_make_it N/A newly_created N/A N/A res N/A N/A N/A client connect N/A N/A res N/A N/A N/A N/A LOG warning can't connect to %s N/A client title N/A N/A N/A N/A tornado gen Return N/A ClientError N/A can't connect to %s N/A client title N/A N/A N/A N/A tornado gen Return client N/A N/A N/A tornado gen coroutine get_client_nowait N/A N/A self N/A N/A N/A Gets a Client object (not necessary connected).

        If max_size is reached, this method will return None (and won't block).

        Returns:
            A Client instance (not necessary connected) as result (or None).
         N/A N/A N/A self __sem None N/A N/A N/A N/A N/A self __sem _value 0 N/A N/A None N/A N/A N/A N/A self __sem acquire N/A N/A _ client N/A N/A self _get_client_from_pool_or_make_it N/A client N/A _autoclose N/A N/A self N/A N/A N/A newpool N/A deque N/A N/A N/A True N/A N/A client N/A N/A N/A self __pool popleft N/A N/A N/A client is_connected N/A N/A N/A N/A self _is_expired_client client N/A N/A N/A N/A client disconnect N/A N/A N/A N/A newpool append client N/A N/A N/A IndexError N/A N/A N/A self __pool newpool N/A _is_expired_client N/A N/A self client N/A N/A N/A N/A N/A N/A self client_timeout -1 N/A N/A client is_connected N/A N/A delta N/A N/A client get_last_state_change_timedelta N/A N/A N/A N/A delta total_seconds N/A self client_timeout N/A N/A True N/A False N/A connected_client N/A N/A self N/A N/A N/A Returns a ContextManagerFuture to be yielded in a with statement.

        Returns:
            A ContextManagerFuture object.

        Examples:
            >>> with (yield pool.connected_client()) as client:
                    # client is a connected tornadis.Client instance
                    # it will be automatically released to the pool thanks to
                    # the "with" keyword
                    reply = yield client.call("PING")
         N/A future N/A N/A self get_connected_client N/A cb N/A N/A functools partial N/A self _connected_client_release_cb future N/A N/A ContextManagerFuture future cb N/A _connected_client_release_cb N/A N/A self future N/A None N/A N/A client N/A N/A future result N/A N/A N/A self release_client client N/A release_client N/A N/A self client N/A N/A N/A Releases a client object to the pool.

        Args:
            client: Client object.
         N/A N/A N/A N/A self _is_expired_client client N/A N/A N/A N/A N/A self __pool append client N/A N/A N/A self __sem None N/A N/A N/A N/A N/A self __sem release N/A destroy N/A N/A self N/A N/A N/A Disconnects all pooled client objects. N/A True N/A N/A N/A N/A client N/A N/A N/A self __pool popleft N/A N/A isinstance client Client N/A N/A N/A N/A client disconnect N/A N/A N/A IndexError N/A N/A N/A preconnect N/A N/A self size N/A -1 N/A N/A (pre)Connects some or all redis clients inside the pool.

        Args:
            size (int): number of redis clients to build and to connect
                (-1 means all clients if pool max_size > -1)

        Raises:
            ClientError: when size == -1 and pool max_size == -1
         N/A N/A N/A size -1 N/A N/A self max_size -1 N/A N/A N/A ClientError size=-1 not allowed with pool max_size=-1 N/A limit N/A N/A size -1 N/A min size N/A self max_size N/A self max_size N/A clients N/A N/A N/A N/A self get_connected_client N/A _ N/A range 0 limit N/A client clients N/A N/A N/A N/A self release_client client N/A N/A N/A tornado gen coroutine _make_client N/A N/A self N/A N/A N/A Makes and returns a Client object. N/A kwargs N/A self client_kwargs N/A client N/A Client kwargs N/A client N/A N/A