Search in sources :

Example 1 with ReentrantSemaphore

use of org.apache.geode.internal.util.concurrent.ReentrantSemaphore in project geode by apache.

the class DirectChannel method setLocalAddr.

/**
   * Callback to set the local address, must be done before this channel is used.
   * 
   * @param localAddr
   * @throws ConnectionException if the conduit has stopped
   */
public void setLocalAddr(InternalDistributedMember localAddr) {
    this.localAddr = localAddr;
    conduit.setMemberId(localAddr);
    if (disconnected) {
        disconnected = false;
        disconnectCompleted = false;
        this.groupOrderedSenderSem = new ReentrantSemaphore(MAX_GROUP_SENDERS);
        this.groupUnorderedSenderSem = new ReentrantSemaphore(MAX_GROUP_SENDERS);
    }
}
Also used : ReentrantSemaphore(org.apache.geode.internal.util.concurrent.ReentrantSemaphore)

Aggregations

ReentrantSemaphore (org.apache.geode.internal.util.concurrent.ReentrantSemaphore)1