Skip to content

Commit

Permalink
Remove ClusterImpl#isShutdown method (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashapolo authored Jan 17, 2022
1 parent d04afe7 commit 3965890
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
7 changes: 0 additions & 7 deletions cluster-api/src/main/java/io/scalecube/cluster/Cluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,4 @@ public interface Cluster {
* @return promise which is completed once graceful shutdown is finished.
*/
Mono<Void> onShutdown();

/**
* Check if cluster instance has been shut down.
*
* @return returns true if cluster instance has been shut down; false otherwise.
*/
boolean isShutdown();
}
5 changes: 0 additions & 5 deletions cluster/src/main/java/io/scalecube/cluster/ClusterImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -558,11 +558,6 @@ public Mono<Void> onShutdown() {
return onShutdown.asMono();
}

@Override
public boolean isShutdown() {
return onShutdown.asMono().toFuture().isDone();
}

private static class SenderAwareTransport implements Transport {

private final Transport transport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ public void onMembershipEvent(MembershipEvent event) {

node2.shutdown();
node2.onShutdown().block(TIMEOUT);
assertTrue(node2.isShutdown());

assertTrue(leavingLatch.await(TIMEOUT.getSeconds(), TimeUnit.SECONDS));
assertTrue(removedLatch.await(TIMEOUT.getSeconds(), TimeUnit.SECONDS));
Expand Down

0 comments on commit 3965890

Please sign in to comment.