public abstract class BaseConfigurationRepository<T extends Configuration,Loader extends ConfigurationLoader<T>,Writer extends ConfigurationWriter<T>> extends AbstractLifecycle implements ConfigurationRepository<T,Loader,Writer>, Reloadable
| 限定符和类型 | 字段和说明 |
|---|---|
protected Comparator<T> |
comparator |
protected ConfigurationEventFactory<T> |
eventFactory |
protected EventPublisher |
eventPublisher |
protected Loader |
loader |
protected Writer |
writer |
inited| 构造器和说明 |
|---|
BaseConfigurationRepository() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(T configuration)
Add a configuration to the repository
it equals:
add(T configuration, true) |
protected void |
doInit() |
protected void |
doStop()
Subclasses must implement this method with the stop behavior.
|
Comparator<T> |
getComparator() |
Loader |
getConfigurationLoader() |
Writer |
getConfigurationWriter() |
EventPublisher |
getEventPublisher() |
protected void |
logMutation(ConfigurationEventType eventType,
T configuration) |
void |
reload() |
void |
removeById(String id)
Remove a configuration by id
it equals:
removeById(T configuration, true) |
void |
setComparator(Comparator<T> comparator) |
void |
setConfigurationLoader(Loader loader)
set a loader
|
void |
setConfigurationWriter(Writer writer)
set a writer
|
void |
setEventFactory(ConfigurationEventFactory<T> eventFactory) |
void |
setEventPublisher(EventPublisher publisher) |
void |
update(T configuration)
update the configuration to storage
it equals:
update(T configuration, true) |
doStart, getName, isRunning, setName, shutdown, startup, stopAndExecute, toStringinitclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, getAll, getById, getName, removeById, setName, updateinit@NonNull protected Loader extends ConfigurationLoader<T> loader
@Nullable protected Writer extends ConfigurationWriter<T> writer
@Nullable protected EventPublisher eventPublisher
@Nullable protected ConfigurationEventFactory<T extends Configuration> eventFactory
protected Comparator<T extends Configuration> comparator
public void setComparator(Comparator<T> comparator)
public Comparator<T> getComparator()
public void setEventFactory(ConfigurationEventFactory<T> eventFactory)
public EventPublisher getEventPublisher()
getEventPublisher 在接口中 EventPublisherAwarepublic void setEventPublisher(EventPublisher publisher)
setEventPublisher 在接口中 EventPublisherAwareprotected void doStop()
AbstractLifecycleAbstractLifecycle.lifecycleLock.doStop 在类中 AbstractLifecyclepublic void setConfigurationLoader(Loader loader)
ConfigurationRepositorysetConfigurationLoader 在接口中 ConfigurationRepository<T extends Configuration,Loader extends ConfigurationLoader<T>,Writer extends ConfigurationWriter<T>>loader - the configuration loaderpublic Loader getConfigurationLoader()
getConfigurationLoader 在接口中 ConfigurationRepository<T extends Configuration,Loader extends ConfigurationLoader<T>,Writer extends ConfigurationWriter<T>>public Writer getConfigurationWriter()
getConfigurationWriter 在接口中 ConfigurationRepository<T extends Configuration,Loader extends ConfigurationLoader<T>,Writer extends ConfigurationWriter<T>>public void setConfigurationWriter(Writer writer)
ConfigurationRepositorysetConfigurationWriter 在接口中 ConfigurationRepository<T extends Configuration,Loader extends ConfigurationLoader<T>,Writer extends ConfigurationWriter<T>>writer - the configuration writerpublic void removeById(String id)
ConfigurationRepositoryremoveById(T configuration, true)removeById 在接口中 ConfigurationRepository<T extends Configuration,Loader extends ConfigurationLoader<T>,Writer extends ConfigurationWriter<T>>removeById 在接口中 Repository<T extends Configuration,String>id - the configuration idpublic void add(T configuration)
ConfigurationRepositoryadd(T configuration, true)add 在接口中 ConfigurationRepository<T extends Configuration,Loader extends ConfigurationLoader<T>,Writer extends ConfigurationWriter<T>>add 在接口中 Repository<T extends Configuration,String>configuration - the configuration beanpublic void update(T configuration)
ConfigurationRepositoryupdate(T configuration, true)update 在接口中 ConfigurationRepository<T extends Configuration,Loader extends ConfigurationLoader<T>,Writer extends ConfigurationWriter<T>>update 在接口中 Repository<T extends Configuration,String>configuration - the configuration beanprotected void logMutation(ConfigurationEventType eventType, T configuration)
protected void doInit()
doInit 在类中 AbstractInitializablepublic void reload()
reload 在接口中 ReloadableCopyright © 2022. All rights reserved.