本文整理汇总了Java中org.apache.lucene.index.AtomicReader.CoreClosedListener类的典型用法代码示例。如果您正苦于以下问题:Java CoreClosedListener类的具体用法?Java CoreClosedListener怎么用?Java CoreClosedListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CoreClosedListener类属于org.apache.lucene.index.AtomicReader包,在下文中一共展示了CoreClosedListener类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: notifyCoreClosedListeners
import org.apache.lucene.index.AtomicReader.CoreClosedListener; //导入依赖的package包/类
private void notifyCoreClosedListeners(Throwable th) {
synchronized(coreClosedListeners) {
for (CoreClosedListener listener : coreClosedListeners) {
// SegmentReader uses our instance as its
// coreCacheKey:
try {
listener.onClose(this);
} catch (Throwable t) {
if (th == null) {
th = t;
} else {
th.addSuppressed(t);
}
}
}
IOUtils.reThrowUnchecked(th);
}
}
示例2: addCoreClosedListener
import org.apache.lucene.index.AtomicReader.CoreClosedListener; //导入依赖的package包/类
void addCoreClosedListener(CoreClosedListener listener) {
coreClosedListeners.add(listener);
}
示例3: removeCoreClosedListener
import org.apache.lucene.index.AtomicReader.CoreClosedListener; //导入依赖的package包/类
void removeCoreClosedListener(CoreClosedListener listener) {
coreClosedListeners.remove(listener);
}