@Override
	public void run() {
		while (!done) {
			timeOutMinutes = mgr.getTimeout(); // update dynamically
			Map<Lock,T> map = ((PessimisticLockManagerImpl)mgr).getLockStore();
			if (map.keySet().size() > 0) {
				System.out.println("LockReaper: Locks currently held at " + new Date() + ":");
			}
			for (Lock lock : map.keySet()) {
				LockImpl<T> l = (LockImpl) lock;
				System.out.println("LockReaper: " + l);
				final long now = System.currentTimeMillis();
				final long then = l.getCreationTime();
				if (now - then > timeOutMinutes * 60000) {
					System.out.println("LockReaper: Removing stale lock " + l);					
					mgr.releaseLock(l);
				}
			}
			try {
				Thread.sleep(1000 * sleepSeconds);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}