Class BucketSelector


  • public class BucketSelector
    extends 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 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​(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