gov.nasa.worldwind
Class BasicRetrievalService
java.lang.Object
gov.nasa.worldwind.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.BasicRetrievalService
- All Implemented Interfaces:
- AVList, RetrievalService, WWObject, PropertyChangeListener, Thread.UncaughtExceptionHandler, EventListener
public final class BasicRetrievalService
- extends WWObjectImpl
- implements RetrievalService, Thread.UncaughtExceptionHandler
Performs threaded retrieval of data.
| Methods inherited from class gov.nasa.worldwind.AVListImpl |
addPropertyChangeListener, addPropertyChangeListener, copy, firePropertyChange, firePropertyChange, getStringValue, getValue, hasKey, propertyChange, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gov.nasa.worldwind.AVList |
addPropertyChangeListener, addPropertyChangeListener, copy, firePropertyChange, firePropertyChange, getStringValue, getValue, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue |
BasicRetrievalService
public BasicRetrievalService()
contains
public boolean contains(Retriever retriever)
- Specified by:
contains in interface RetrievalService
- Parameters:
retriever - the retriever to check
- Returns:
true if the retriever is being run or pending execution
- Throws:
IllegalArgumentException - if retriever is null
getNumRetrieversPending
public int getNumRetrieversPending()
- Specified by:
getNumRetrieversPending in interface RetrievalService
getProgress
public double getProgress()
getRetrieverPoolSize
public int getRetrieverPoolSize()
- Specified by:
getRetrieverPoolSize in interface RetrievalService
hasActiveTasks
public boolean hasActiveTasks()
- Specified by:
hasActiveTasks in interface RetrievalService
isFull
public boolean isFull()
- Specified by:
isFull in interface RetrievalService
runRetriever
public RetrievalFuture runRetriever(Retriever retriever)
- Specified by:
runRetriever in interface RetrievalService
- Parameters:
retriever - the retriever to run
- Returns:
- a future object that can be used to query the request status of cancel the request.
- Throws:
IllegalArgumentException - if retrieer is null or has no name
runRetriever
public RetrievalFuture runRetriever(Retriever retriever,
double priority)
- Specified by:
runRetriever in interface RetrievalService
- Parameters:
retriever - the retriever to runpriority - the secondary priority of the retriever, or negative if it is to be the primary priority
- Returns:
- a future object that can be used to query the request status of cancel the request.
- Throws:
IllegalArgumentException - if retriever is null or has no name
setRetrieverPoolSize
public void setRetrieverPoolSize(int poolSize)
- Specified by:
setRetrieverPoolSize in interface RetrievalService
- Parameters:
poolSize - the number of threads in the thread pool
- Throws:
IllegalArgumentException - if poolSize is non-positive
uncaughtException
public void uncaughtException(Thread thread,
Throwable throwable)
- Specified by:
uncaughtException in interface Thread.UncaughtExceptionHandler