src/main/java/me/paulbares/subscription/ApproverWorkflowRegistrar.java
protected void writeExecute(String key, Runnable task) {
    Lock lock = this.sync.get(key).writeLock();
    lock.lock();
    try {
      task.run();
    } finally {
      lock.unlock();
    }
  }
/**
   * Executes the given action within the write lock given by {@code this.sync.get(key)}.
   *
   * @param key the key used to retrieve the write lock in {@link #sync}
   * @param task the action to execute
   */
Executes the given action within the write lock given by  this.sync.get(key).
@param key the key used to retrieve the write lock in  #sync
@param task the action to execute
Executes the given action within the write lock given by this . sync . get ( key ) . @param key the key used to retrieve the write lock in #sync @param task the action to execute
protected void writeExecute(String key, Runnable task) {
    Lock lock = this.sync.get(key).writeLock();
    lock.lock();
    try {
      task.run();
    } finally {
      lock.unlock();
    }
  }
protected void writeExecute ( String key , Runnable task ) { Lock lock = this . sync . get ( key ) . writeLock ( ) ; lock . lock ( ) ; try { task . run ( ) ; } finally { lock . unlock ( ) ; } }
Executes the given action within the write lock given by {@code this.sync.get(key)}.
Executes the given action within the write lock given by { @code this . sync . get ( key ) } .