@Override public String toString() { return MoreObjects.toStringHelper(this) .add("serverId", serverId()) .add("servers", servers()) .add("additionalProperties", additionalProperties()) .add("timeoutMillis", timeoutMillis()) .add("numWorkers", numWorkers()) .add("maxLogCount", maxLogCount()) .add("minLogAgeMillis", minLogAgeMillis()).toString(); } }
private void deleteLogs() throws Exception { final List<String> children = curator.getChildren().forPath(absolutePath(LOG_PATH)); if (children.size() <= cfg.maxLogCount()) { return; final int targetCount = children.size() - cfg.maxLogCount(); final List<String> deleted = new ArrayList<>(targetCount); children.sort(Comparator.comparingLong(Long::parseLong));
private void deleteLogs() throws Exception { final List<String> children = curator.getChildren().forPath(absolutePath(LOG_PATH)); if (children.size() <= cfg.maxLogCount()) { return; final int targetCount = children.size() - cfg.maxLogCount(); final List<String> deleted = new ArrayList<>(targetCount); children.sort(Comparator.comparingLong(Long::parseLong));
private void deleteLogs() throws Exception { final List<String> children = curator.getChildren().forPath(absolutePath(LOG_PATH)); if (children.size() <= cfg.maxLogCount()) { return; final int targetCount = children.size() - cfg.maxLogCount(); final List<String> deleted = new ArrayList<>(targetCount); children.sort(Comparator.comparingLong(Long::parseLong));
@Override public boolean equals(Object obj) { if (!(obj instanceof ZooKeeperReplicationConfig)) { return false; } if (obj == this) { return true; } final ZooKeeperReplicationConfig that = (ZooKeeperReplicationConfig) obj; return serverId() == that.serverId() && servers().equals(that.servers()) && additionalProperties().equals(that.additionalProperties()) && timeoutMillis() == that.timeoutMillis() && numWorkers() == that.numWorkers() && maxLogCount() == that.maxLogCount() && minLogAgeMillis() == that.minLogAgeMillis(); }
@Override public boolean equals(Object obj) { if (!(obj instanceof ZooKeeperReplicationConfig)) { return false; } if (obj == this) { return true; } final ZooKeeperReplicationConfig that = (ZooKeeperReplicationConfig) obj; return serverId() == that.serverId() && servers().equals(that.servers()) && additionalProperties().equals(that.additionalProperties()) && timeoutMillis() == that.timeoutMillis() && numWorkers() == that.numWorkers() && maxLogCount() == that.maxLogCount() && minLogAgeMillis() == that.minLogAgeMillis(); }
@Override public boolean equals(Object obj) { if (!(obj instanceof ZooKeeperReplicationConfig)) { return false; } if (obj == this) { return true; } final ZooKeeperReplicationConfig that = (ZooKeeperReplicationConfig) obj; return serverId() == that.serverId() && servers().equals(that.servers()) && additionalProperties().equals(that.additionalProperties()) && timeoutMillis() == that.timeoutMillis() && numWorkers() == that.numWorkers() && maxLogCount() == that.maxLogCount() && minLogAgeMillis() == that.minLogAgeMillis(); }
@Override public String toString() { return MoreObjects.toStringHelper(this) .add("serverId", serverId()) .add("servers", servers()) .add("additionalProperties", additionalProperties()) .add("timeoutMillis", timeoutMillis()) .add("numWorkers", numWorkers()) .add("maxLogCount", maxLogCount()) .add("minLogAgeMillis", minLogAgeMillis()).toString(); } }
@Override public String toString() { return MoreObjects.toStringHelper(this) .add("serverId", serverId()) .add("servers", servers()) .add("additionalProperties", additionalProperties()) .add("timeoutMillis", timeoutMillis()) .add("numWorkers", numWorkers()) .add("maxLogCount", maxLogCount()) .add("minLogAgeMillis", minLogAgeMillis()).toString(); } }