Class BackgroundInitializer.InitializationTask

  • All Implemented Interfaces:
    java.util.concurrent.Callable<T>
    Enclosing class:
    BackgroundInitializer<T>

    private class BackgroundInitializer.InitializationTask
    extends java.lang.Object
    implements java.util.concurrent.Callable<T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.ExecutorService execFinally
      Stores the executor service to be destroyed at the end.
    • Constructor Summary

      Constructors 
      Constructor Description
      InitializationTask​(java.util.concurrent.ExecutorService exec)
      Creates a new instance of InitializationTask and initializes it with the ExecutorService to be destroyed at the end.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T call()
      Initiates initialization and returns the result.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • execFinally

        private final java.util.concurrent.ExecutorService execFinally
        Stores the executor service to be destroyed at the end.
    • Constructor Detail

      • InitializationTask

        InitializationTask​(java.util.concurrent.ExecutorService exec)
        Creates a new instance of InitializationTask and initializes it with the ExecutorService to be destroyed at the end.
        Parameters:
        exec - the ExecutorService
    • Method Detail

      • call

        public T call()
               throws java.lang.Exception
        Initiates initialization and returns the result.
        Specified by:
        call in interface java.util.concurrent.Callable<T>
        Returns:
        the result object
        Throws:
        java.lang.Exception - if an error occurs