HiRISE

HiRISE.HiCat.HiTList
Class ThreadCounter

java.lang.Object
  extended by HiRISE.HiCat.HiTList.ThreadCounter

public class ThreadCounter
extends Object

ThreadCounter is a little utility class for counting the number of search threads that are running concurrently within HiTList. All accessor methods are synchronized

Version:
1.1
Author:
Rodney Heyd UA/HiRISE

Field Summary
static String ID
           
 
Constructor Summary
ThreadCounter()
           
 
Method Summary
 int count()
          Get the current count of running threads.
 void decrement()
          Decrements the number of running threads.
 void increment()
          Increments the number of running threads.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values
Constructor Detail

ThreadCounter

public ThreadCounter()
Method Detail

increment

public void increment()
Increments the number of running threads. This should be called by the SearchComponent just prior to launching the search thread


decrement

public void decrement()
Decrements the number of running threads. This should be called when a thread completes running


count

public int count()
Get the current count of running threads.

Returns:
an integer indicating the number of currently running threads.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona