- Type Parameters:
T- The sort of service that this implements
- All Known Implementing Classes:
public interface ReloadableService<T> extends InitializableComponent
A service that supports reloading its configuration.
Method SummaryModifier and TypeMethodDescriptionGets the time when the service last attempted to reload.Gets the time when the service was last successfully reloaded.Gets the reason the last reload failed.Get the serviceable component that this service supports.
reload()Reloads the configuration of the service.
getLastSuccessfulReloadInstant@Nullable Instant getLastSuccessfulReloadInstant()Gets the time when the service was last successfully reloaded. Returns null if the service has never reloaded.
- time when the service was last successfully reloaded
getLastReloadAttemptInstant@Nullable Instant getLastReloadAttemptInstant()Gets the time when the service last attempted to reload. If the reload was successful this time should match the time given by
- time when the service last attempted to reload
getReloadFailureCause@Nullable Throwable getReloadFailureCause()Gets the reason the last reload failed.
- reason the last reload failed or null if the last reload was successful
reloadvoid reload()Reloads the configuration of the service. Whether internal state is maintained between reloads is implementation dependent.
ServiceException- thrown if there is a problem reloading the service
getServiceableComponentGet the serviceable component that this service supports. If the component hasn't been successfully loaded yet or if this service does not support a ServiceableComponent, null is returned. On a non-null value, the returned component will be pinned and MUST be unpinned by a call to
- the component, if appropriate.