boolean isRunning() { return self.isRunning() && zk.isRunning(); } }
private boolean isRunning() { return self.isRunning() && zk.isRunning(); }
boolean isRunning() { return self.isRunning() && zk.isRunning(); } }
public void resetPeer(final int id) { if (zkServers.get(id).getQuorumPeer().isRunning()) { throw new IllegalStateException("peer is still running: " + id); } final Path peerDir = peerDir(id); try { // Wipe and recreate the data directory FileUtils.deleteDirectory(peerDir.toFile()); Files.createDirectory(peerDir); } catch (IOException e) { throw new RuntimeException(e); } }
private boolean isRunning() { return self.isRunning() && zk.isRunning(); }
public void startPeer(final int id) { if (zkServers.get(id).getQuorumPeer().isRunning()) { throw new IllegalStateException("peer is already running: " + id); } try { zkServers.get(id).restart(); } catch (Exception e) { Throwables.throwIfUnchecked(e); throw new RuntimeException(e); } }
@Override public synchronized void shutdown() { if (started) { started = false; if (transactionLog != null) { try { transactionLog.close(); } catch (final IOException ioe) { logger.warn("Failed to close Transaction Log", ioe); } } if (connectionFactory != null) { connectionFactory.shutdown(); } if (quorumPeer != null && quorumPeer.isRunning()) { quorumPeer.shutdown(); } if (embeddedZkServer != null && embeddedZkServer.isRunning()) { embeddedZkServer.shutdown(); } if (datadirCleanupManager != null) { datadirCleanupManager.shutdown(); } } }
responseBytes.length); int xid = epochGen.nextInt(); while (self.isRunning()) { HashMap<InetSocketAddress, Vote> votes = new HashMap<InetSocketAddress, Vote>(self.getVotingView().size());
if (isRunning()) { Observer.waitForReconnectDelay();
while (self.isRunning()) { readPacket(qp); switch(qp.getType()) {
while (self.isRunning()) { readPacket(qp); switch(qp.getType()) {
public void startPeer(final int id) { if (zkServers.get(id).getQuorumPeer().isRunning()) { throw new IllegalStateException("peer is already running: " + id); } try { zkServers.get(id).restart(); } catch (Exception e) { throw Throwables.propagate(e); } }
public void resetPeer(final int id) { if (zkServers.get(id).getQuorumPeer().isRunning()) { throw new IllegalStateException("peer is still running: " + id); } final Path peerDir = peerDir(id); try { // Wipe and recreate the data directory FileUtils.deleteDirectory(peerDir.toFile()); Files.createDirectory(peerDir); } catch (IOException e) { throw Throwables.propagate(e); } }
while (self.isRunning()) { readPacket(qp); processPacket(qp);
while (self.isRunning()) { readPacket(qp); processPacket(qp);
new HashMap<InetSocketAddress, Vote>(self.getVotingView().size()); int xid = epochGen.nextInt(); while (self.isRunning()) { votes.clear(); requestBuffer.clear();