Interface LookupExtractorFactory
-
- All Superinterfaces:
com.google.common.base.Supplier<LookupExtractor>,Supplier<LookupExtractor>
public interface LookupExtractorFactory extends com.google.common.base.Supplier<LookupExtractor>
Users of Lookup Extraction need to implement aLookupExtractorFactorysupplier of typeLookupExtractor. Such factory will manage the state and life cycle of an given lookup. If a LookupExtractorFactory wishes to support idempotent updates, it needs to implement the `replaces` method
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidawaitInitialization()awaitToInitialise blocks and wait for the cache to initialize fully.booleanclose()This method will be called to stop the LookupExtractor upon Druid process stop.default booleandestroy()This method will be called to drop the LookupExtractor upon explicit user request to coordinator to drop this lookup.LookupIntrospectHandlergetIntrospectHandler()booleanisInitialized()booleanreplaces(LookupExtractorFactory other)Deprecated.booleanstart()This method will be called to start the LookupExtractor upon registered Calling start multiple times should return true if successfully started.
-
-
-
Method Detail
-
start
boolean start()
This method will be called to start the LookupExtractor upon registered Calling start multiple times should return true if successfully started.
- Returns:
- Returns false if is not successfully started the
LookupExtractorotherwise returns true.
-
close
boolean close()
This method will be called to stop the LookupExtractor upon Druid process stop. This would be used, for example, to stop any thread pools it might have. Calling this method multiple times should always return true if successfully closed.
- Returns:
- Returns false if not successfully closed the
LookupExtractorotherwise returns true
-
destroy
default boolean destroy()
This method will be called to drop the LookupExtractor upon explicit user request to coordinator to drop this lookup. In this method user can do additional cleanup (e.g. deleting disk persisted cache) not done simply when Druid process was being stopped to be restarted. Calling this method multiple times should always return true if successfully destroyed.
- Returns:
- Returns false if not successfully destroyed the
LookupExtractorotherwise returns true
-
replaces
@Deprecated boolean replaces(@Nullable LookupExtractorFactory other)
Deprecated.This method is deprecated and is not removed only to allow 0.10.0 to 0.10.1 transition. It is not used on a cluster that is running 0.10.1. It will be removed in a later release.
-
getIntrospectHandler
@Nullable LookupIntrospectHandler getIntrospectHandler()
- Returns:
- Returns the actual introspection request handler, can return
nullif it is not supported. This will be called once per HTTP request to introspect the actual lookup.
-
awaitInitialization
void awaitInitialization() throws InterruptedException, TimeoutExceptionawaitToInitialise blocks and wait for the cache to initialize fully.- Throws:
InterruptedExceptionTimeoutException
-
isInitialized
boolean isInitialized()
- Returns:
- true if cache is loaded and lookup is queryable else returns false
-
-