Interface BitmapResultFactory<T>

  • Type Parameters:
    T - the bitmap result (wrapper) type
    All Known Implementing Classes:
    DefaultBitmapResultFactory

    public interface BitmapResultFactory<T>
    BitmapResultFactory is an abstraction that allows to record something along with preFilter bitmap construction, and emit this information as dimension(s) of query metrics. BitmapResultFactory is similar to BitmapFactory: it has the same methods with the exception that it accepts generic type T (bitmap wrapper type) instead of ImmutableBitmap. DefaultBitmapResultFactory is a no-op implementation, where "wrapper" type is ImmutableBitmap itself. BitmapResultFactory delegates actual operations on bitmaps to a BitmapFactory, which it accepts in constructor, called from QueryMetrics.makeBitmapResultFactory(BitmapFactory). Emitting of query metric dimension(s) should be done from toImmutableBitmap(Object), the "unwrapping" method, called only once to obtain the final preFilter bitmap. Implementors expectations ------------------------- BitmapResultFactory is a part of the QueryMetrics subsystem, so this interface could be changed often, in every Druid release (including "patch" releases). Users who create their custom implementations of BitmapResultFactory should be ready to fix the code of their code to accommodate interface changes (e. g. implement new methods) when they update Druid. See QueryMetrics Javadoc for more info.
    See Also:
    QueryMetrics.makeBitmapResultFactory(BitmapFactory), QueryMetrics.reportBitmapConstructionTime(long)