Esempio n. 1
0
    def get(self, key):
        """
        :param key:
        :return:
        """
        check_not_none(key, "key can't be None")

        key_data = self._to_data(key)
        request = map_get_codec.encode_request(self.name, key_data, thread_id=thread_id())
        response = self._invoke_on_key(request, key_data)
        result_data = map_get_codec.decode_response(response)["response"]
        return self._to_object(result_data)
Esempio n. 2
0
 def encode(self):
     self.request = map_get_codec.encode_request(self.name, self.key,
                                                 self.thread_id)
 def encode(self):
     self.request = map_get_codec.encode_request(self.name, self.key, self.thread_id)