Ejemplo n.º 1
0
 public Object put(Object key, Object value) {
   try {
     return client.put((String) key, DataSerialization.toByteArray(value));
   } catch (ClientException e) {
     throw new ClientRuntimeException();
   } catch (IOException e) {
     throw new ClientRuntimeException();
   }
 }
Ejemplo n.º 2
0
 public Object get(Object key) {
   try {
     byte[] bytes = client.get((String) key);
     return DataSerialization.toObject(bytes);
   } catch (ClientException e) {
     throw new ClientRuntimeException();
   } catch (IOException e) {
     throw new ClientRuntimeException();
   } catch (ClassNotFoundException e) {
     throw new ClientRuntimeException();
   }
 }