Interface ReloadingContainer<T>

  • Type Parameters:
    T - bean type
    All Known Implementing Classes:
    ConfigReloadContainer

    public interface ReloadingContainer<T>
    A container managing a bean which can reloaded.
    • Method Detail

      • getObject

        T getObject()
        Retrieve the object held by the container. May also trigger a reload if the check interval has passed.
        Returns:
        the object
      • reload

        void reload()
        Immediately reload the object. The next call to getObject() will return the updated object.
      • setReloadCheckInterval

        void setReloadCheckInterval​(Long reloadCheckInterval)
        Set the frequency at which the object should be checked for updates. The check is performed when calls to getObject() are made once the interval has passed.
        Parameters:
        reloadCheckInterval - interval in ms, if null the default value will be used, if <= 0 reload checks will be disabled
      • getLastUpdate

        Long getLastUpdate()
        Retrieve the time at which the object was last updated.
        Returns:
        timestamp in ms