类 ParallelAggregation

java.lang.Object
org.bitlap.roaringbitmap.ParallelAggregation

public class ParallelAggregation extends Object
These utility methods provide parallel implementations of logical aggregation operators. AND is not implemented because it is unlikely to be profitable. There is a temporary memory overhead in using these methods, since a materialisation of the rotated containers grouped by key is created in each case. Each method executes on the default fork join pool by default. If this is undesirable (it usually is) wrap the call inside a submission of a runnable to your own thread pool.
 

       //...

       ExecutorService executor = ...
       RoaringBitmap[] bitmaps = ...
       // executes on executors threads
       RoaringBitmap result = executor.submit(() -> ParallelAggregation.or(bitmaps)).get();
 
 
  • 构造器详细资料

    • ParallelAggregation

      public ParallelAggregation()
  • 方法详细资料

    • groupByKey

      public static SortedMap<Character,List<Container>> groupByKey(RoaringBitmap... bitmaps)
      Groups the containers by their keys
      参数:
      bitmaps - input bitmaps
      返回:
      The containers from the bitmaps grouped by key
    • or

      public static RoaringBitmap or(RoaringBitmap... bitmaps)
      Computes the bitwise union of the input bitmaps
      参数:
      bitmaps - the input bitmaps
      返回:
      the union of the bitmaps
    • xor

      public static RoaringBitmap xor(RoaringBitmap... bitmaps)
      Computes the bitwise symmetric difference of the input bitmaps
      参数:
      bitmaps - the input bitmaps
      返回:
      the symmetric difference of the bitmaps