本文整理了Java中com.spotify.helios.servicescommon.coordination.ZooKeeperModelReporter.checkException()
方法的一些代码示例,展示了ZooKeeperModelReporter.checkException()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperModelReporter.checkException()
方法的具体详情如下:
包路径:com.spotify.helios.servicescommon.coordination.ZooKeeperModelReporter
类名称:ZooKeeperModelReporter
方法名:checkException
暂无
代码示例来源:origin: spotify/helios
public <T> T time(final String tag, final String name, ZooKeeperCallable<T> callable)
throws KeeperException {
final long startTime = clock.getTick();
try {
return callable.call();
} catch (KeeperException e) {
checkException(e, tag, name);
throw e;
} catch (Exception e) {
Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
} finally {
metrics.updateTimer(name, clock.getTick() - startTime, TimeUnit.NANOSECONDS);
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public void delete(String path, int version) throws KeeperException {
try {
client.delete(path, version);
} catch (KeeperException e) {
reporter.checkException(e, tag, "delete");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public byte[] getData(String path) throws KeeperException {
try {
return client.getData(path);
} catch (KeeperException e) {
reporter.checkException(e, tag, "getData");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public void deleteRecursive(String path) throws KeeperException {
try {
client.deleteRecursive(path);
} catch (KeeperException e) {
reporter.checkException(e, tag, "deleteRecursive");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public void create(String path) throws KeeperException {
try {
client.create(path);
} catch (KeeperException e) {
reporter.checkException(e, tag, "create");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public void ensurePath(String path) throws KeeperException {
try {
client.ensurePath(path);
} catch (KeeperException e) {
reporter.checkException(e, tag, "ensurePath");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public List<String> listRecursive(String path) throws KeeperException {
try {
return client.listRecursive(path);
} catch (KeeperException e) {
reporter.checkException(e, tag, "listRecursive");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public ZooKeeper.States getState() throws KeeperException {
try {
return client.getState();
} catch (KeeperException e) {
reporter.checkException(e, tag, "getDeploymentGroupStatus");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public void delete(String path) throws KeeperException {
try {
client.delete(path);
} catch (KeeperException e) {
reporter.checkException(e, tag, "delete");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public void createAndSetData(String path, byte[] data) throws KeeperException {
try {
client.createAndSetData(path, data);
} catch (KeeperException e) {
reporter.checkException(e, tag, "createAndSetData");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public Stat stat(String path) throws KeeperException {
try {
return client.stat(path);
} catch (KeeperException e) {
reporter.checkException(e, tag, "stat");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public Collection<CuratorTransactionResult> transaction(List<ZooKeeperOperation> operations)
throws KeeperException {
try {
return client.transaction(operations);
} catch (KeeperException e) {
reporter.checkException(e, tag, "transaction");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public void ensurePath(String path, boolean excludingLast) throws KeeperException {
try {
client.ensurePath(path, excludingLast);
} catch (KeeperException e) {
reporter.checkException(e, tag, "ensurePath");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public List<String> getChildren(String path) throws KeeperException {
try {
return client.getChildren(path);
} catch (KeeperException e) {
reporter.checkException(e, tag, "getChildren");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public void setData(String path, byte[] bytes) throws KeeperException {
try {
client.setData(path, bytes);
} catch (KeeperException e) {
reporter.checkException(e, tag, "setData");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public void createWithMode(String path, CreateMode mode) throws KeeperException {
try {
client.createWithMode(path, mode);
} catch (KeeperException e) {
reporter.checkException(e, tag, "createWithMode");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public Collection<CuratorTransactionResult> transaction(ZooKeeperOperation... operations)
throws KeeperException {
try {
return client.transaction(operations);
} catch (KeeperException e) {
reporter.checkException(e, tag, "transaction");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public Node getNode(String path) throws KeeperException {
try {
return client.getNode(path);
} catch (KeeperException e) {
reporter.checkException(e, tag, "getNode");
throw e;
}
}
代码示例来源:origin: at.molindo/helios-services
@Override
public Stat exists(String path) throws KeeperException {
try {
return client.exists(path);
} catch (KeeperException e) {
reporter.checkException(e, tag, "exists");
throw e;
}
}
内容来源于网络,如有侵权,请联系作者删除!