code: public void prohibitModifications() {
      lock.writeLock().lock();
      try {
        throwException = false;
        veto = true;
      } finally {
        lock.writeLock().unlock();
      }
    }
docs: After this method finished it's execution, all threads that are going to perform data modifications in storage should wait till
  {@link #allowModifications()} method will be called. This method will wait till all ongoing modifications will be finished.