T
- bean typepublic interface ReloadingContainer<T>
Modifier and Type | Method and Description |
---|---|
Long |
getLastUpdate()
Retrieve the time at which the object was last updated.
|
T |
getObject()
Retrieve the object held by the container.
|
void |
reload()
Immediately reload the object.
|
void |
setReloadCheckInterval(Long reloadCheckInterval)
Set the frequency at which the object should be checked for updates.
|
T getObject()
void reload()
getObject()
will return the updated object.void setReloadCheckInterval(Long reloadCheckInterval)
getObject()
are made once the interval has passed.reloadCheckInterval
- interval in ms, if null
the default value will be used, if <= 0 reload checks will be disabledLong getLastUpdate()
Copyright © 2020. All rights reserved.