private CompletableFuture < Void > updateNodes ( ) { List < CompletableFuture < Void >> futures = membershipService . getMembers ( ) . stream ( ) . filter ( node -> ! localMemberId . equals ( node . id ( ) ) ) . map ( this :: updateNode ) . collect ( Collectors . toList ( ) ) ; return CompletableFuture . allOf ( futures . toArray ( new CompletableFuture [ futures . size ( ) ] ) ) ; }
Updates all active peers with a given subscription .