public class IndexerDispatcher extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
IndexerDispatcher.IndexerDispatcherFactory |
| Constructor and Description |
|---|
IndexerDispatcher(MetaIndexEngine indexEngine,
Collection<? extends Indexer> indexers,
KCluster cluster,
IndexerScheduler.Factory schedulerFactory,
javax.enterprise.event.Event<BatchIndexEvent> batchIndexEvent,
org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
static IndexerDispatcher.IndexerDispatcherFactory |
createFactory(MetaIndexEngine indexEngine,
IndexerScheduler.Factory schedulerFactory,
javax.enterprise.event.Event<BatchIndexEvent> batchIndexEvent,
org.slf4j.Logger logger) |
void |
dispose() |
void |
offer(IndexableIOEvent event) |
CompletableFuture<Void> |
schedule(ExecutorService executor)
Note that a CDI
BatchIndexEvent is fired for each individual indexer job that finishes. |
public IndexerDispatcher(MetaIndexEngine indexEngine, Collection<? extends Indexer> indexers, KCluster cluster, IndexerScheduler.Factory schedulerFactory, javax.enterprise.event.Event<BatchIndexEvent> batchIndexEvent, org.slf4j.Logger logger)
public static IndexerDispatcher.IndexerDispatcherFactory createFactory(MetaIndexEngine indexEngine, IndexerScheduler.Factory schedulerFactory, javax.enterprise.event.Event<BatchIndexEvent> batchIndexEvent, org.slf4j.Logger logger)
public void offer(IndexableIOEvent event)
event - An indexing event to be queued. Must not be null. The event will
be dispatched to all Indexers for which the underlying path
is supported (see Indexer.supportsPath(Path)).public CompletableFuture<Void> schedule(ExecutorService executor)
BatchIndexEvent is fired for each individual indexer job that finishes.executor - The ExecutorService used for asynchronous scheduling.CompletableFuture that completes when all indexing jobs have finished. If
any job completes execptionally, this future completes exceptionally. Must not be null.public void dispose()
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.