@classmethod
def get_tunable(cls, what, default):
    """
        Returns either an overridden tunable, or the default value.
        The result will be casted to the type of default.

        :param what: tunable to look up
        :type what: str
        :param default: default value
        :return: either the overridden tunable or the default value

        >>> tunable('my.tunable', 3.1415)
        3.1415
        """
    cls.defaults[what] = default
    if cls.force_default or what not in cls.current:
        result = default
        if cls.force_default:
            cls.logger.debug('Getting tunable "%s", forcing default: %s',
                what, repr(result))
        else:
            cls.logger.debug('Getting tunable "%s", using default: %s',
                what, repr(result))
    else:
        result = type(default)(cls.current[what])
        cls.logger.debug('Getting tunable "%s", using override: %s', what,
            repr(result))
    return result
