| | |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | * Portions Copyright 2015-2016 ForgeRock AS. |
| | | */ |
| | | package org.opends.guitools.controlpanel.browser; |
| | | |
| | |
| | | * |
| | | * The queue will basically start a certain number of threads and this threads |
| | | * will "consume" the AbstractNodeTask objects that are added to this queue. |
| | | * |
| | | */ |
| | | class NodeSearcherQueue implements Runnable { |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Shutdown this queue. |
| | | * All the associated threads are stopped. |
| | | */ |
| | | /** Shutdown this queue. All the associated threads are stopped. */ |
| | | public void shutdown() { |
| | | threadGroup.interrupt(); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Cancel all the object from this queue. |
| | | */ |
| | | /** Cancel all the object from this queue. */ |
| | | public synchronized void cancelAll() { |
| | | waitingQueue.clear(); |
| | | for (BasicNode node : workingList.keySet()) |
| | |
| | | * the NodeSearchQueue constructor. |
| | | * Basically this method fetches objects from the waiting queue and runs them. |
| | | */ |
| | | @Override |
| | | public void run() { |
| | | boolean interrupted = false; |
| | | while (!interrupted) |