Package ptolemy.distributed.client

Examples of ptolemy.distributed.client.ClientThread


            Iterator firings = level.firingIterator();

            while (firings.hasNext()) {
                Firing firing = (Firing) firings.next();
                Actor actor = firing.getActor();
                ClientThread clientThread = (ClientThread) actorsThreadsMap
                        .get(actor);
                clientThread.setIterationCount(firing.getIterationCount());
                commandsMap.put(clientThread, Integer
                        .valueOf(ClientThread.ITERATE));
            }

            int aux = levelNumber - iterationsValue;

            if (aux >= 0) {
                firings = schedule.get(aux).firingIterator();

                while (firings.hasNext()) {
                    Firing firing = (Firing) firings.next();
                    Actor actor = firing.getActor();

                    System.out.println("removing: " + actor.getFullName());
                    ClientThread clientThread = (ClientThread) actorsThreadsMap
                            .get(actor);
                    clientThread.setIterationCount(firing.getIterationCount());
                    commandsMap.remove(clientThread);
                }
            }

            levelNumber = levelNumber + 1;
View Full Code Here


            for (Iterator actorsIterator = actors.iterator(); actorsIterator
                    .hasNext();) {
                Object auxActor = actorsIterator.next();
                Object auxServer = serversIterator.next();
                ClientThread auxClientThread = new ClientThread(synchronizer,
                        (ServiceItem) auxServer);
                actorsThreadsMap.put(auxActor, auxClientThread);
                auxClientThread.start();
            }
        } else {
            System.out.println("Not enough servers");
        }
View Full Code Here

            HashMap commandsMap = new HashMap();

            while (firings.hasNext()) {
                Firing firing = (Firing) firings.next();
                Actor actor = firing.getActor();
                ClientThread clientThread = (ClientThread) actorsThreadsMap
                        .get(actor);
                clientThread.setIterationCount(firing.getIterationCount());
                commandsMap.put(clientThread, Integer
                        .valueOf(ClientThread.ITERATE));
            }

            synchronizer.setCommands(commandsMap);
View Full Code Here

            while (firings.hasNext()) {
                Firing firing = (Firing) firings.next();
                Actor actor = firing.getActor();

                //                System.out.println("removing: " + actor.getFullName());
                ClientThread clientThread = (ClientThread) actorsThreadsMap
                        .get(actor);
                clientThread.setIterationCount(firing.getIterationCount());
                commandsMap.remove(clientThread);
            }
        }

        synchronizer.setCommands(commandsMap);
View Full Code Here

TOP

Related Classes of ptolemy.distributed.client.ClientThread

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.