This logic is duplicated between non tx and tx distribution interceptor. Consider extracting an  method(replaceValueInContext) and move it to either the invocationContext or the EntryWrappingFactory. I'm pretty sure the locking logic is not required here at least for the nonTransaction(Concurrent)DistInterceptor.