Class ObjectHolder.SingletonHolder<C extends Serializable,​V>

    • Field Detail

      • DEFAULT_SHUTDOWN_HOOK_PRIORITY

        public static int DEFAULT_SHUTDOWN_HOOK_PRIORITY
        The default priority of the shutdown hook. This is set to be executed after the SparkContext shutdown hook (which has priority 50) and before temporary dirs are cleaned up (priority 25). See ShutdownHookManager for more info on Spark related shutdown hooks.
    • Method Detail

      • getOrCreate

        @Nonnull
        public V getOrCreate​(@Nonnull
                             C config)
        Description copied from interface: ObjectHolder
        Retrieves the instance associated with given configuration and if necessary creates ones.
        Specified by:
        getOrCreate in interface ObjectHolder<C extends Serializable,​V>
        Parameters:
        config - the configuration for the instance.
        Returns:
        the instance associated with the holder.
      • close

        public void close()
        Closes this singleton and releases any system resources associated with it. If the singleton is already closed then invoking this method has no effect.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable