Class ZoneRulesInitializer

    • Field Detail

      • INITIALIZED

        private static final java.util.concurrent.atomic.AtomicBoolean INITIALIZED
      • INITIALIZER

        private static final java.util.concurrent.atomic.AtomicReference<ZoneRulesInitializer> INITIALIZER
    • Constructor Detail

      • ZoneRulesInitializer

        public ZoneRulesInitializer()
    • Method Detail

      • setInitializer

        public static void setInitializer​(ZoneRulesInitializer initializer)
        Sets the initializer to use.

        This can only be invoked before the ZoneRulesProvider class is loaded. Invoking this method at a later point will throw an exception.

        Parameters:
        initializer - the initializer to use
        Throws:
        java.lang.IllegalStateException - if initialization has already occurred or another initializer has been set
      • initialize

        static void initialize()
      • initializeProviders

        protected abstract void initializeProviders()
        Initialize the providers.

        The implementation should perform whatever work is necessary to initialize the providers. This will result in one or more calls to ZoneRulesProvider.registerProvider(ZoneRulesProvider).

        It is vital that the instance of ZoneRulesProvider is not created until this method is invoked.

        It is guaranteed that this method will be invoked once and only once.