Class ReloadManager


  • public class ReloadManager
    extends java.lang.Object
    ReloadManager controls modules to reloading while needed

    Register order is reloading order preventing unexpected behavior.

    • Constructor Summary

      Constructors 
      Constructor Description
      ReloadManager()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void register​(@NotNull Reloadable reloadable)
      Register a reloadable module into reloading registery
      void register​(@NotNull java.lang.reflect.Method reloadMethod)
      Register a reloadable module into reloading registery
      @NotNull java.util.Map<ReloadableContainer,​ReloadResult> reload()
      Reload all reloadable modules
      @NotNull java.util.Map<ReloadableContainer,​ReloadResult> reload​(@Nullable java.lang.Class<Reloadable> clazz)
      Reload all reloadable modules that equals specific class
      void unregister​(@NotNull Reloadable reloadable)
      Unregister a reloadable module from reloading registry
      void unregister​(@NotNull java.lang.Class<Reloadable> clazz)
      Unregister all reloadable modules that same with specific class from reloading registry
      void unregister​(@NotNull java.lang.reflect.Method reloadMethod)
      Register a reloadable module into reloading registery
      • Methods inherited from class java.lang.Object

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

      • ReloadManager

        public ReloadManager()
    • Method Detail

      • register

        public void register​(@NotNull
                             @NotNull Reloadable reloadable)
        Register a reloadable module into reloading registery
        Parameters:
        reloadable - Reloadable module
      • register

        public void register​(@NotNull
                             @NotNull java.lang.reflect.Method reloadMethod)
        Register a reloadable module into reloading registery
        Parameters:
        reloadMethod - Reloadable module
      • unregister

        public void unregister​(@NotNull
                               @NotNull java.lang.reflect.Method reloadMethod)
        Register a reloadable module into reloading registery
        Parameters:
        reloadMethod - Reloadable module
      • unregister

        public void unregister​(@NotNull
                               @NotNull Reloadable reloadable)
        Unregister a reloadable module from reloading registry
        Parameters:
        reloadable - Reloadable module
      • unregister

        public void unregister​(@NotNull
                               @NotNull java.lang.Class<Reloadable> clazz)
        Unregister all reloadable modules that same with specific class from reloading registry
        Parameters:
        clazz - Class that impl reloadable
      • reload

        @NotNull
        public @NotNull java.util.Map<ReloadableContainer,​ReloadResult> reload​(@Nullable
                                                                                     @Nullable java.lang.Class<Reloadable> clazz)
        Reload all reloadable modules that equals specific class
        Parameters:
        clazz - The class that impl reloadable
        Returns:
        Reloading results