예제 #1
0
 private static void send(Producer<Long, Message> producer, String topic, List id, List value) {
   List tuple = new ArrayList();
   tuple.addAll(id);
   tuple.addAll(value);
   byte[] bytes = ser.serialize(tuple);
   producer.send(
       new ProducerData<Long, Message>(
           topic, Crc64.getCrc(JSONValue.toJSONString(id).getBytes()), L(new Message(bytes))));
 }
예제 #2
0
 @Override
 public List<Object> deserialize(byte[] bytes) {
   if (ser == null) ser = new DefaultSerializer();
   return ser.deserialize(bytes);
 }