Actually this will likely be accessed by several threads (since Netty uses a threadpool and will uses several threads to process incoming connections) - in which case, locks are likely to perform better.