Simple variable locker which uses ReentrantReadWriteLock() for locking the getter and setter.