TraverserWorkerManager

public class TraverserWorkerManager extends Object

Factory object for creating TraverserWorker instances.

Public Method Summary

static TraverserWorker
newWorker(TraverserConfiguration conf, IndexingService indexingService)
Creates a TraverserWorker instance based on the TraverserConfiguration.
static TraverserWorker
newWorker(TraverserConfiguration conf, IndexingService indexingService, ExecutorService executor)
Creates a TraverserWorker instance based on the TraverserConfiguration.

Inherited Method Summary

Public Methods

public static TraverserWorker newWorker (TraverserConfiguration conf, IndexingService indexingService)

Creates a TraverserWorker instance based on the TraverserConfiguration.

Each instance creates its own ExecutorService.

Parameters
conf configuration of the worker thread
indexingService IndexingService instance used for polling items
Returns

public static TraverserWorker newWorker (TraverserConfiguration conf, IndexingService indexingService, ExecutorService executor)

Creates a TraverserWorker instance based on the TraverserConfiguration.

An external, shared ExecutorService can provide better resource utilization. However, if you use one, the TraverserWorker does not handle the executor's shutdown method.

Parameters
conf configuration of the worker thread
indexingService IndexingService instance used for polling items
executor the ExecutorService that is used by the worker thread but if null, the TraverserWorker creates its own ExecutorService
Returns

Send feedback about...

Cloud Search
Cloud Search