public class DefaultSharedIndexInformer<ApiType,ApiListType> extends java.lang.Object implements SharedIndexInformer<ApiType>
| Constructor and Description |
|---|
DefaultSharedIndexInformer(java.lang.Class<ApiType> apiTypeClass,
ListerWatcher<ApiType,ApiListType> listerWatcher,
long resyncPeriod,
DeltaFIFO<ApiType> deltaFIFO,
Indexer<ApiType> indexer) |
DefaultSharedIndexInformer(java.lang.Class<ApiType> apiTypeClass,
ListerWatcher listerWatcher,
long resyncPeriod) |
DefaultSharedIndexInformer(java.lang.Class<ApiType> apiTypeClass,
ListerWatcher listerWatcher,
long resyncPeriod,
Cache<ApiType> cache) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventHandler(ResourceEventHandler<ApiType> handler)
add event callback
|
void |
addEventHandlerWithResyncPeriod(ResourceEventHandler<ApiType> handler,
long resyncPeriodMillis)
add event callback with a resync period
|
void |
addIndexers(java.util.Map indexers)
Add indexers.
|
Indexer |
getIndexer()
getIndexer returns the internal indexer store.
|
boolean |
hasSynced()
hasSynced returns true if the shared informer's store has synced.
|
java.lang.String |
lastSyncResourceVersion()
Last sync resource version string.
|
void |
run()
run starts the shared informer, which will be stopped until stop() is called.
|
void |
stop()
stop stops the shared informer.
|
public DefaultSharedIndexInformer(java.lang.Class<ApiType> apiTypeClass, ListerWatcher listerWatcher, long resyncPeriod)
public DefaultSharedIndexInformer(java.lang.Class<ApiType> apiTypeClass, ListerWatcher listerWatcher, long resyncPeriod, Cache<ApiType> cache)
public DefaultSharedIndexInformer(java.lang.Class<ApiType> apiTypeClass, ListerWatcher<ApiType,ApiListType> listerWatcher, long resyncPeriod, DeltaFIFO<ApiType> deltaFIFO, Indexer<ApiType> indexer)
public void addEventHandler(ResourceEventHandler<ApiType> handler)
addEventHandler in interface SharedInformer<ApiType>handler - the handlerpublic void addEventHandlerWithResyncPeriod(ResourceEventHandler<ApiType> handler, long resyncPeriodMillis)
addEventHandlerWithResyncPeriod in interface SharedInformer<ApiType>handler - the event handlerresyncPeriodMillis - the specific resync periodpublic java.lang.String lastSyncResourceVersion()
SharedInformerlastSyncResourceVersion in interface SharedInformer<ApiType>public void run()
SharedInformerrun in interface SharedInformer<ApiType>public void stop()
SharedInformerstop in interface SharedInformer<ApiType>public boolean hasSynced()
SharedInformerhasSynced in interface SharedInformer<ApiType>public void addIndexers(java.util.Map indexers)
SharedIndexInformeraddIndexers in interface SharedIndexInformer<ApiType>indexers - the indexerspublic Indexer getIndexer()
SharedIndexInformergetIndexer in interface SharedIndexInformer<ApiType>Copyright © 2019. All rights reserved.