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 a LookupExtractorFactory supplier of type LookupExtractor. 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

    Modifier and Type
    Method
    Description
    void
    awaitToInitialise blocks and wait for the cache to initialize fully.
    boolean
    This method will be called to stop the LookupExtractor upon Druid process stop.
    default boolean
    This method will be called to drop the LookupExtractor upon explicit user request to coordinator to drop this lookup.
     
    boolean
     
    boolean
    Deprecated.
    boolean
    This method will be called to start the LookupExtractor upon registered Calling start multiple times should return true if successfully started.

    Methods inherited from interface com.google.common.base.Supplier

    get
  • Method Details

    • 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 LookupExtractor otherwise 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 LookupExtractor otherwise 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 LookupExtractor otherwise 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 null if it is not supported. This will be called once per HTTP request to introspect the actual lookup.
    • awaitInitialization

      void awaitInitialization() throws InterruptedException, TimeoutException
      awaitToInitialise blocks and wait for the cache to initialize fully.
      Throws:
      InterruptedException
      TimeoutException
    • isInitialized

      boolean isInitialized()
      Returns:
      true if cache is loaded and lookup is queryable else returns false