Class BucketSelector


  • public class BucketSelector
    extends java.lang.Object
    This class is used to find out in which locations a document might be in, if it matches a given document selection string.
    Author:
    Håkon Humberset
    • Constructor Summary

      Constructors 
      Constructor Description
      BucketSelector​(BucketIdFactory factory)
      The bucket selector needs to be instantiated to be used, as it will depend on config.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      BucketSet getBucketList​(java.lang.String selector)
      Get the set of buckets that may contain documents that match the given document selection, as long as the document selection does not result in an unknown set of buckets.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BucketSelector

        public BucketSelector​(BucketIdFactory factory)
        The bucket selector needs to be instantiated to be used, as it will depend on config.
        Parameters:
        factory - The bucket factory is needed to get information of how bucket ids are put together.
    • Method Detail

      • getBucketList

        public BucketSet getBucketList​(java.lang.String selector)
                                throws ParseException
        Get the set of buckets that may contain documents that match the given document selection, as long as the document selection does not result in an unknown set of buckets. If it does, null will be returned. This requires the caller to be aware of the meaning of these return values, but also removes the need for redundant space utilization when dealing with unknown bucket sets.
        Parameters:
        selector - The document selection string
        Returns:
        a list of buckets with arbitrary number of location bits set, or, null if the document selection resulted in an unknown set
        Throws:
        ParseException - if selector couldn't be parsed