Add proper synchronization when access metrics.
Add proper synchronization when access metrics.

Motivation:

We also need to add synchronization when access fields to ensure we see the latest updates.

Modifications:

Add synchronization when read fields that are written concurrently.

Result:

Ensure correct visibility of updated.

imangry/netty-zh,imangry/netty-zh,chanakaudaya/netty,chanakaudaya/netty,yipen9/netty,imangry/netty-zh,yipen9/netty,chanakaudaya/netty,chanakaudaya/netty,imangry/netty-zh,yipen9/netty,chanakaudaya/netty,imangry/netty-zh,yipen9/netty