public <T> T runWriteAction(@NotNull final Computable<T> computation) {
   final AccessToken token = acquireWriteActionLock(computation.getClass());
   try {
     return computation.compute();
   } finally {
     token.finish();
   }
 }
 public void runWriteAction(@NotNull final Runnable action) {
   final AccessToken token = acquireWriteActionLock(action.getClass());
   try {
     action.run();
   } finally {
     token.finish();
   }
 }
  public <T> T runReadAction(@NotNull final Computable<T> computation) {
    final AccessToken token = acquireReadActionLockImpl(false);

    try {
      return computation.compute();
    } finally {
      token.finish();
    }
  }
  public void runReadAction(@NotNull final Runnable action) {
    final AccessToken token = acquireReadActionLockImpl(false);

    try {
      action.run();
    } finally {
      token.finish();
    }
  }