implement lock method in reentrantlock with adapter usage