@@ -99,6 +99,24 @@ public synchronized <ApiType, ApiListType> SharedIndexInformer<ApiType> sharedIn
9999 long resyncPeriodInMillis ) {
100100 ListerWatcher <ApiType , ApiListType > listerWatcher =
101101 listerWatcherFor (callGenerator , apiTypeClass , apiListTypeClass );
102+ return sharedIndexInformerFor (listerWatcher , apiTypeClass , resyncPeriodInMillis );
103+ }
104+
105+ /**
106+ * Constructs and returns a shared index informer by specifying lister-watcher. And the informer
107+ * cache will be overwritten on multiple call w/ the the same apiTypeClass.
108+ *
109+ * @param <ApiType> the type parameter
110+ * @param <ApiListType> the type parameter
111+ * @param listerWatcher the lister watcher
112+ * @param apiTypeClass the api type class
113+ * @param resyncPeriodInMillis the resync period in millis
114+ * @return the shared index informer
115+ */
116+ public synchronized <ApiType , ApiListType > SharedIndexInformer <ApiType > sharedIndexInformerFor (
117+ ListerWatcher <ApiType , ApiListType > listerWatcher ,
118+ Class <ApiType > apiTypeClass ,
119+ long resyncPeriodInMillis ) {
102120 SharedIndexInformer <ApiType > informer =
103121 new DefaultSharedIndexInformer <ApiType , ApiListType >(
104122 apiTypeClass , listerWatcher , resyncPeriodInMillis );
0 commit comments