private byte [ ] handleHeartbeat ( Address address , byte [ ] message ) { GossipMember remoteMember = SERIALIZER . decode ( message ) ; LOGGER . trace ( "{} - Received heartbeat: {}" , localMember . id ( ) , remoteMember ) ; failureDetectors . computeIfAbsent ( remoteMember . id ( ) , n -> new PhiAccrualFailureDetector ( ) ) . report ( ) ; updateMember ( remoteMember , true ) ; // Return only reachable members to avoid populating removed members on remote nodes from unreachable members. return SERIALIZER . encode ( Lists . newArrayList ( members . values ( ) . stream ( ) . filter ( member -> member . isReachable ( ) ) . collect ( Collectors . toList ( ) ) ) ) ; }
Handles a heartbeat message .