@Override public byte[] get(String path) throws DistributedStoreException { try { return cache.get(relative(path)); } catch (Exception ex) { throw new DistributedStoreException(ex); } }
@Override public List<String> getChildren(String path) throws DistributedStoreException { try { return cache.getChildren(relative(path)); } catch (Exception ex) { throw new DistributedStoreException(ex); } }
@Override public void put(String path, byte[] bs) throws DistributedStoreException { try { path = relative(path); context.getZooReaderWriter().putPersistentData(path, bs, NodeExistsPolicy.OVERWRITE); cache.clear(); log.debug("Wrote {} to {}", new String(bs, UTF_8), path); } catch (Exception ex) { throw new DistributedStoreException(ex); } }
@Override public void remove(String path) throws DistributedStoreException { try { log.debug("Removing {}", path); path = relative(path); IZooReaderWriter zoo = context.getZooReaderWriter(); if (zoo.exists(path)) zoo.recursiveDelete(path, NodeMissingPolicy.SKIP); cache.clear(); } catch (Exception ex) { throw new DistributedStoreException(ex); } } }
@Override public List<String> getChildren(String path) throws DistributedStoreException { try { return cache.getChildren(relative(path)); } catch (Exception ex) { throw new DistributedStoreException(ex); } }
@Override public byte[] get(String path) throws DistributedStoreException { try { return cache.get(relative(path)); } catch (Exception ex) { throw new DistributedStoreException(ex); } }
@Override public byte[] get(String path) throws DistributedStoreException { try { return cache.get(relative(path)); } catch (Exception ex) { throw new DistributedStoreException(ex); } }
@Override public List<String> getChildren(String path) throws DistributedStoreException { try { return cache.getChildren(relative(path)); } catch (Exception ex) { throw new DistributedStoreException(ex); } }
@Override public void put(String path, byte[] bs) throws DistributedStoreException { try { path = relative(path); ZooReaderWriter.getInstance().putPersistentData(path, bs, NodeExistsPolicy.OVERWRITE); cache.clear(); log.debug("Wrote " + new String(bs, UTF_8) + " to " + path); } catch (Exception ex) { throw new DistributedStoreException(ex); } }
@Override public void put(String path, byte[] bs) throws DistributedStoreException { try { path = relative(path); ZooReaderWriter.getInstance().putPersistentData(path, bs, NodeExistsPolicy.OVERWRITE); cache.clear(); log.debug("Wrote " + new String(bs, UTF_8) + " to " + path); } catch (Exception ex) { throw new DistributedStoreException(ex); } }
@Override public void remove(String path) throws DistributedStoreException { try { log.debug("Removing " + path); path = relative(path); IZooReaderWriter zoo = ZooReaderWriter.getInstance(); if (zoo.exists(path)) zoo.recursiveDelete(path, NodeMissingPolicy.SKIP); cache.clear(); } catch (Exception ex) { throw new DistributedStoreException(ex); } } }
@Override public void remove(String path) throws DistributedStoreException { try { log.debug("Removing " + path); path = relative(path); IZooReaderWriter zoo = ZooReaderWriter.getInstance(); if (zoo.exists(path)) zoo.recursiveDelete(path, NodeMissingPolicy.SKIP); cache.clear(); } catch (Exception ex) { throw new DistributedStoreException(ex); } } }