private boolean completeSnapshot ( long index ) { // Compute the lowest completed index for all sessions that belong to this state machine. long lastCompleted = index ; for ( RaftSession session : raft . getSessions ( ) . getSessions ( ) ) { lastCompleted = Math . min ( lastCompleted , session . getLastCompleted ( ) ) ; } return lastCompleted >= index ; }
Determines whether to complete the snapshot at the given index .