@Override public void asyncGetCursorInfo(String ledgerName, String consumerName, final MetaStoreCallback<ManagedCursorInfo> callback) { String path = prefix + ledgerName + "/" + consumerName; if (log.isDebugEnabled()) { log.debug("Reading from {}", path); } zk.getData(path, false, (rc, path1, ctx, data, stat) -> executor.executeOrdered(ledgerName, safeRun(() -> { if (rc != Code.OK.intValue()) { callback.operationFailed(new MetaStoreException(KeeperException.create(Code.get(rc)))); } else { try { ManagedCursorInfo info = parseManagedCursorInfo(data); callback.operationComplete(info, new ZKStat(stat)); } catch (ParseException | InvalidProtocolBufferException e) { callback.operationFailed(new MetaStoreException(e)); } } })), null); if (log.isDebugEnabled()) { log.debug("Reading from {} ok", path); } }
@Override public void asyncGetCursorInfo(String ledgerName, String consumerName, final MetaStoreCallback<ManagedCursorInfo> callback) { String path = prefix + ledgerName + "/" + consumerName; if (log.isDebugEnabled()) { log.debug("Reading from {}", path); } zk.getData(path, false, (rc, path1, ctx, data, stat) -> executor.executeOrdered(ledgerName, safeRun(() -> { if (rc != Code.OK.intValue()) { callback.operationFailed(new MetaStoreException(KeeperException.create(Code.get(rc)))); } else { try { ManagedCursorInfo info = parseManagedCursorInfo(data); callback.operationComplete(info, new ZKStat(stat)); } catch (ParseException | InvalidProtocolBufferException e) { callback.operationFailed(new MetaStoreException(e)); } } })), null); if (log.isDebugEnabled()) { log.debug("Reading from {} ok", path); } }
@Override public void asyncGetCursorInfo(String ledgerName, String consumerName, final MetaStoreCallback<ManagedCursorInfo> callback) { String path = prefix + ledgerName + "/" + consumerName; if (log.isDebugEnabled()) { log.debug("Reading from {}", path); } zk.getData(path, false, (rc, path1, ctx, data, stat) -> executor.submit(safeRun(() -> { if (rc != Code.OK.intValue()) { callback.operationFailed(new MetaStoreException(KeeperException.create(Code.get(rc)))); } else { try { ManagedCursorInfo info = parseManagedCursorInfo(data); callback.operationComplete(info, new ZKStat(stat)); } catch (ParseException | InvalidProtocolBufferException e) { callback.operationFailed(new MetaStoreException(e)); } } })), null); if (log.isDebugEnabled()) { log.debug("Reading from {} ok", path); } }