Object result=null; try { readWriteLock.readLock().acquire(); result= invocation.invokeNext(); } finally { readWriteLock.readLock().release(); } return result;
Object result = null; try { readWriteLock.writeLock().acquire(); result= invocation.invokeNext(); } finally { readWriteLock.writeLock().release(); } return result;