Code example for CountDownLatch

Methods: countDown

0
    public void deliverFuture(IOFSwitch sw, OFMessage msg) {
        if (transactionId == msg.getXid()) {
            handleReply(sw, msg);
            if (isFinished()) { 
                unRegister(); 
                this.latch.countDown();
            } 
        } 
    } 
 
    /** 
     * Used to handle the specific expected message this Future was reigstered 
     * for, the specified msg parameter is guaranteed to match the type and 
     * transaction id specified. 
     * @param sw 
     * @param msg 
     * @return 
     */ 
    protected abstract void handleReply(IOFSwitch sw, OFMessage msg);
 
    /**