# Path: tooz/hashring.py
# class UnknownNode(tooz.ToozError):
# class HashRing(object):
#     def __init__(self, node):
#     def __init__(self, nodes, partitions=DEFAULT_PARTITION_NUMBER,
#                  hash_function=DEFAULT_HASH_FUNCTION):
#     def add_node(self, node, weight=1):
#     def add_nodes(self, nodes, weight=1):
#     def remove_node(self, node):
#     def _hash2int(key):
#     def _get_partition(self, data):
#     def _get_node(self, partition):
#     def get_nodes(self, data, ignore_nodes=None, replicas=1):
#     def __getitem__(self, key):
#     def __len__(self):
#     DEFAULT_PARTITION_NUMBER = 2**5
#     DEFAULT_HASH_FUNCTION = 'md5'


from tooz import hashring
# -*- coding: utf-8 -*-
#
#    Copyright (C) 2016 Red Hat, Inc.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.



class Partitioner(object):
    """Partition set of objects across several members.

    Objects to be partitioned should implement the __tooz_hash__ method to
    identify themselves across the consistent hashring. This should method
    return bytes.

    """


# Path: tooz/hashring.py
# class UnknownNode(tooz.ToozError):
# class HashRing(object):
#     def __init__(self, node):
#     def __init__(self, nodes, partitions=DEFAULT_PARTITION_NUMBER,
#                  hash_function=DEFAULT_HASH_FUNCTION):
#     def add_node(self, node, weight=1):
#     def add_nodes(self, nodes, weight=1):
#     def remove_node(self, node):
#     def _hash2int(key):
#     def _get_partition(self, data):
#     def _get_node(self, partition):
#     def get_nodes(self, data, ignore_nodes=None, replicas=1):
#     def __getitem__(self, key):
#     def __len__(self):
#     DEFAULT_PARTITION_NUMBER = 2**5
#     DEFAULT_HASH_FUNCTION = 'md5'


# Path: tooz/partitioner.py
from tooz import hashring

# -*- coding: utf-8 -*-
#
#    Copyright (C) 2016 Red Hat, Inc.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.



class Partitioner(object):
    """Partition set of objects across several members.

    Objects to be partitioned should implement the __tooz_hash__ method to
    identify themselves across the consistent hashring. This should method
    return bytes.

    """


    DEFAULT_PARTITION_NUMBER = hashring.HashRing.DEFAULT_PARTITION_NUMBER