private ImmutableMember handleProbe ( Pair < ImmutableMember , ImmutableMember > members ) { ImmutableMember remoteMember = members . getLeft ( ) ; ImmutableMember localMember = members . getRight ( ) ; LOGGER . trace ( "{} - Received probe {} from {}" , this . localMember . id ( ) , localMember , remoteMember ) ; // If the probe indicates a term greater than the local term, update the local term, increment and respond. if ( localMember . incarnationNumber ( ) > this . localMember . getIncarnationNumber ( ) ) { this . localMember . setIncarnationNumber ( localMember . incarnationNumber ( ) + 1 ) ; if ( config . isBroadcastDisputes ( ) ) { broadcast ( this . localMember . copy ( ) ) ; } } // If the probe indicates this member is suspect, increment the local term and respond. else if ( localMember . state ( ) == State . SUSPECT ) { this . localMember . setIncarnationNumber ( this . localMember . getIncarnationNumber ( ) + 1 ) ; if ( config . isBroadcastDisputes ( ) ) { broadcast ( this . localMember . copy ( ) ) ; } } // Update the state of the probing member. updateState ( remoteMember ) ; return this . localMember . copy ( ) ; }
Handles a probe from another peer .