public static Data toData(Object obj) {
   if (obj == null) {
     return null;
   }
   if (obj instanceof Data) {
     return (Data) obj;
   }
   return ThreadContext.get().toData(obj);
 }
 public byte[] getByteArray(String mapName, String key) {
   Object value = hazelcast.getMap(mapName).get(key);
   byte[] result = null;
   if (value != null) {
     if (value instanceof RestValue) {
       RestValue restValue = (RestValue) value;
       result = restValue.getValue();
     } else if (value instanceof byte[]) {
       result = (byte[]) value;
     } else {
       result = ThreadContext.get().toByteArray(value);
     }
   }
   return result;
 }
 public static Object toObject(Data data) {
   if (data == null) {
     return null;
   }
   return ThreadContext.get().toObject(data);
 }
Example #4
0
 public static Object toObject(Data data) {
   return ThreadContext.get().toObject(data);
 }