コード例 #1
0
  /** @return {@code true} if entered to busy state. */
  private boolean enterBusy() {
    if (busyLock.readLock().tryLock()) return true;

    if (log.isDebugEnabled())
      log.debug("Failed to enter busy state (exchanger is stopping): " + this);

    return false;
  }
コード例 #2
0
 private void leaveBusy() {
   busyLock.readLock().unlock();
 }