public <T> T runWithLock(Callable<T> runnable) {
      try {
        locked = true;
        return runnable.call();
      }
      catch (Exception e) {
        throw new RuntimeException(e);
      }
      finally {
        locked = false;
      }
    }
public <T> T runWithLock(Callable<T> runnable)