Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr keyword NameLoad If UnaryOpNot NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad handlers ExceptHandler type NameLoad body Pass FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If CompareLt Call NameLoad NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Pass While NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return NameLoad If BoolOpAnd CompareEq Call NameLoad NameLoad Num CompareEq SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num keyword NameLoad body Continue Expr Call AttributeLoad NameLoad attr Continue Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num keyword NameLoad body Continue Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list decorator_list
N/A N/A Zookeeper Barriers

:Maintainer: None
:Status: Unknown

 N/A os N/A socket N/A uuid kazoo.protocol.states EventType kazoo.exceptions KazooException kazoo.exceptions NoNodeError kazoo.exceptions NodeExistsError Barrier N/A object N/A N/A Kazoo Barrier

    Implements a barrier to block processing of a set of nodes until
    a condition is met at which point the nodes will be allowed to
    proceed. The barrier is in place if its node exists.

    .. warning::

        The :meth:`wait` function does not handle connection loss and
        may raise :exc:`~kazoo.exceptions.ConnectionLossException` if
        the connection is lost while waiting.

     __init__ N/A N/A self client path N/A N/A N/A Create a Kazoo Barrier

        :param client: A :class:`~kazoo.client.KazooClient` instance.
        :param path: The barrier path to use.

         N/A N/A self client client N/A N/A self path path N/A create N/A N/A self N/A N/A N/A Establish the barrier if it doesn't exist already N/A N/A N/A N/A self client retry N/A N/A self client ensure_path N/A self path N/A remove N/A N/A self N/A N/A N/A Remove the barrier

        :returns: Whether the barrier actually needed to be removed.
        :rtype: bool

         N/A N/A N/A N/A N/A N/A self client retry N/A N/A self client delete N/A self path N/A True N/A N/A N/A NoNodeError N/A N/A False N/A wait N/A N/A self timeout N/A None N/A N/A Wait on the barrier to be cleared

        :returns: True if the barrier has been cleared, otherwise
                  False.
        :rtype: bool

         N/A cleared N/A N/A N/A N/A self client handler event_object wait_for_clear N/A N/A event N/A N/A N/A N/A N/A event type N/A EventType DELETED N/A N/A N/A N/A cleared set N/A N/A exists N/A N/A N/A self client exists N/A self path watch wait_for_clear N/A N/A exists N/A N/A True N/A N/A N/A cleared wait timeout N/A N/A N/A cleared is_set N/A N/A DoubleBarrier N/A object N/A N/A Kazoo Double Barrier

    Double barriers are used to synchronize the beginning and end of
    a distributed task. The barrier blocks when entering it until all
    the members have joined, and blocks when leaving until all the
    members have left.

    .. note::

        You should register a listener for session loss as the process
        will no longer be part of the barrier once the session is
        gone. Connection losses will be retried with the default retry
        policy.

     __init__ N/A N/A self client path num_clients identifier N/A None N/A N/A Create a Double Barrier

        :param client: A :class:`~kazoo.client.KazooClient` instance.
        :param path: The barrier path to use.
        :param num_clients: How many clients must enter the barrier to
                            proceed.
        :type num_clients: int
        :param identifier: An identifier to use for this member of the
                           barrier when participating. Defaults to the
                           hostname + process id.

         N/A N/A self client client N/A N/A self path path N/A N/A self num_clients num_clients N/A N/A self _identifier N/A identifier N/A %s-%s N/A N/A N/A socket getfqdn N/A N/A os getpid N/A N/A self participating False N/A N/A self assured_path False N/A N/A self node_name N/A N/A N/A uuid uuid4 hex N/A N/A self create_path N/A N/A N/A self path / N/A self node_name N/A enter N/A N/A self N/A N/A N/A Enter the barrier, blocks until all nodes have entered N/A N/A N/A N/A N/A N/A self client retry N/A self _inner_enter N/A N/A self participating True N/A N/A N/A KazooException N/A N/A N/A N/A self _best_effort_cleanup N/A N/A self participating False N/A _inner_enter N/A N/A self N/A N/A N/A N/A N/A self assured_path N/A N/A N/A N/A N/A self client ensure_path N/A self path N/A N/A self assured_path True N/A ready N/A N/A N/A N/A self client handler event_object N/A N/A N/A N/A N/A N/A self client create N/A self create_path N/A N/A N/A self _identifier encode utf-8 ephemeral True N/A N/A N/A NodeExistsError N/A N/A created N/A N/A event N/A N/A N/A N/A N/A event type N/A EventType CREATED N/A N/A N/A N/A ready set N/A N/A N/A N/A N/A self client exists N/A N/A N/A self path / ready watch created N/A children N/A N/A N/A self client get_children N/A self path N/A N/A N/A len children N/A self num_clients N/A N/A N/A N/A ready wait N/A N/A N/A N/A N/A self client ensure_path N/A N/A self path /ready N/A True N/A leave N/A N/A self N/A N/A N/A Leave the barrier, blocks until all nodes have left N/A N/A N/A N/A N/A N/A self client retry N/A self _inner_leave N/A N/A N/A KazooException N/A N/A N/A N/A self _best_effort_cleanup N/A N/A self participating False N/A _inner_leave N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A self client delete N/A N/A self path /ready N/A N/A N/A NoNodeError N/A N/A N/A True N/A N/A children N/A N/A N/A self client get_children N/A self path N/A N/A children N/A N/A True N/A N/A N/A N/A len children 1 N/A N/A children N/A 0 N/A self node_name N/A N/A N/A N/A N/A self client delete N/A self create_path N/A True N/A N/A N/A children sort N/A ready N/A N/A N/A N/A self client handler event_object deleted N/A N/A event N/A N/A N/A N/A N/A event type N/A EventType DELETED N/A N/A N/A N/A ready set N/A N/A N/A N/A self node_name N/A children N/A 0 N/A N/A N/A N/A N/A N/A self client exists N/A N/A N/A self path / N/A children N/A -1 watch deleted N/A N/A N/A N/A N/A ready wait N/A N/A N/A N/A N/A self client delete N/A self create_path N/A N/A N/A N/A N/A self client exists N/A N/A N/A self path / N/A children N/A 0 watch deleted N/A N/A N/A N/A N/A ready wait N/A _best_effort_cleanup N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A self client retry N/A N/A self client delete N/A self create_path N/A N/A N/A NoNodeError N/A N/A N/A N/A