@Override public void put(ByteArrayKey key, byte[] value) { try { this.client.set(getKey(key), 0, CompressionUtil.compress(value)); } catch (TimeoutException | InterruptedException | MemcachedException e) { throw new MyCachedIoException(e.getMessage(), e); } }
@Override public byte[] get(ByteArrayKey key) { try { final String mmKey = getKey(key); final byte[] raw = this.client.get(mmKey); return CompressionUtil.uncompress(raw); } catch (TimeoutException | InterruptedException | MemcachedException e) { throw new MyCachedIoException(e.getMessage(), e); } }