private CompletableFuture < Void > handleSnapshot ( ) { return Futures . allOf ( partitions . values ( ) . stream ( ) . map ( partition -> partition . snapshot ( ) ) . collect ( Collectors . toList ( ) ) ) . thenApply ( v -> null ) ; }
Handles a snapshot request from a peer .