Class BasicRetrievalService

    • Constructor Detail

      • BasicRetrievalService

        public BasicRetrievalService()
    • Method Detail

      • uncaughtException

        public void uncaughtException​(java.lang.Thread thread,
                                      java.lang.Throwable throwable)
        Specified by:
        uncaughtException in interface java.lang.Thread.UncaughtExceptionHandler
      • 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:
        java.lang.IllegalArgumentException - if retriever 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 run
        priority - 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:
        java.lang.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:
        java.lang.IllegalArgumentException - if poolSize is non-positive
      • 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:
        java.lang.IllegalArgumentException - if retriever is null
      • getProgress

        public double getProgress()