def __init__(self, config): super(HotRodCacheClient, self).__init__(config["host"], config["port"], config["cache"]) self.config = config if config["hotrod.use_river_string_keys"] in TRUE_STR_VALUES: self.river_keys = RiverStringCodec() else: self.river_keys = None if self.cache_name == DEFAULT_CACHE_NAME: self.cache_name = ""; self.remote_cache = RemoteCache(self.host, int(self.port), self.cache_name) return
test_codec_simple(m, "c") a256 = "" for i in range(1, 256): a256 += "a" a257 = a256 + "a" a258 = a257 + "a" a65336 = "" a65536 = "" a65537 = "" for i in range(1, 65336): a65336 += "a" for i in range(1, 65536): a65536 += "a" for i in range(1, 65537): a65537 += "a" a65538 = a65537 + "a" test_codec_simple(m, a256) test_codec_simple(m, a257) test_codec_simple(m, a258) test_codec_simple(m, a65336) test_codec_simple(m, a65536) test_codec_simple(m, a65537) test_codec_simple(m, a65538) print "testing RiverString" test_codec(RiverStringCodec()) print "testing RiverByteArray" test_codec(RiverByteArrayCodec())