# Path: riak/util.py
# class lazy_property(object):
#     '''
#     A method decorator meant to be used for lazy evaluation and
#     memoization of an object attribute. The property should represent
#     immutable data, as it replaces itself on first access.
#     '''
#     def __init__(self, fget):
#         self.fget = fget
#         self.func_name = fget.__name__
# 
#     def __get__(self, obj, cls):
#         if obj is None:
#             return None
#         value = self.fget(obj)
#         setattr(obj, self.func_name, value)
#         return value


from distutils.version import LooseVersion
from riak.util import lazy_property
        Whether bucket-types are supported.

        :rtype: bool
        """
        return self.server_version >= versions[2.0]

    def datatypes(self):
        """
        Whether datatypes are supported.

        :rtype: bool
        """
        return self.server_version >= versions[2.0]

    def preflists(self):
        """
        Whether bucket/key preflists are supported.

        :rtype: bool
        """
        return self.server_version >= versions[2.1]

    def write_once(self):
        """
        Whether write-once operations are supported.

        :rtype: bool
        """
        return self.server_version >= versions[2.1]


# Path: riak/util.py
# class lazy_property(object):
#     '''
#     A method decorator meant to be used for lazy evaluation and
#     memoization of an object attribute. The property should represent
#     immutable data, as it replaces itself on first access.
#     '''
#     def __init__(self, fget):
#         self.fget = fget
#         self.func_name = fget.__name__
# 
#     def __get__(self, obj, cls):
#         if obj is None:
#             return None
#         value = self.fget(obj)
#         setattr(obj, self.func_name, value)
#         return value


# Path: riak/transports/feature_detect.py
from distutils.version import LooseVersion
from riak.util import lazy_property

        Whether bucket-types are supported.

        :rtype: bool
        """
        return self.server_version >= versions[2.0]

    def datatypes(self):
        """
        Whether datatypes are supported.

        :rtype: bool
        """
        return self.server_version >= versions[2.0]

    def preflists(self):
        """
        Whether bucket/key preflists are supported.

        :rtype: bool
        """
        return self.server_version >= versions[2.1]

    def write_once(self):
        """
        Whether write-once operations are supported.

        :rtype: bool
        """
        return self.server_version >= versions[2.1]


    @lazy_property