question: private void internalAddHead ( final MessageReference ref ) { queueMemorySize . addAndGet ( ref . getMessageMemoryEstimate ( ) ) ; refAdded ( ref ) ; int priority = getPriority ( ref ) ; messageReferences . addHead ( ref , priority ) ; }
target:  The caller of this method requires synchronized on the queue. I'm not going to add synchronized to this method just for a precaution, as I'm not 100% sure this won't cause any extra runtime.