Package ptolemy.domains.pn.kernel

Examples of ptolemy.domains.pn.kernel.PNQueueReceiver


    protected void _incrementLowestCapacityPort() throws IllegalActionException {
        if (_writeBlockedQueues == null) {
            return;
        }

        PNQueueReceiver smallestCapacityQueue = null;
        int smallestCapacity = -1;
        Iterator receivers = _writeBlockedQueues.keySet().iterator();

        if (!receivers.hasNext()) {
            return;
        }

        while (receivers.hasNext()) {
            PNQueueReceiver queue = (PNQueueReceiver) receivers.next();

            if (smallestCapacity == -1) {
                smallestCapacityQueue = queue;
                smallestCapacity = queue.getCapacity();
            } else if (smallestCapacity > queue.getCapacity()) {
                smallestCapacityQueue = queue;
                smallestCapacity = queue.getCapacity();
            }
        }

        if (smallestCapacityQueue.getCapacity() <= 0) {
            smallestCapacityQueue.setCapacity(1);
View Full Code Here

TOP

Related Classes of ptolemy.domains.pn.kernel.PNQueueReceiver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.