Interface RangeFactory
-
- All Known Implementing Classes:
AbstractCoreKeyRangeFactory
,ByteEntityRangeFactory
,ClassicRangeFactory
public interface RangeFactory
The range factory is designed so that a List of AccumuloRange
s can be created from just a providedElementId
andGraphFilters
. The created range list should contain all the ranges (preferably optimised) necessary to retrieve all desiredElement
s as expressed by the gaffer.accumulostore.operation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<org.apache.accumulo.core.data.Range>
getRange(ElementId elementId, GraphFilters operation)
Returns a Range representing a query for the given IDorg.apache.accumulo.core.data.Range
getRangeFromPair(Pair<ElementId,ElementId> pairRange, GraphFilters operation)
Operation Returns a Range representing a query for all values between the givenElementId
s taken from the minimum comparable byte value of the provided keys and the maximum comparable byte value.
-
-
-
Method Detail
-
getRange
List<org.apache.accumulo.core.data.Range> getRange(ElementId elementId, GraphFilters operation) throws RangeFactoryException
Returns a Range representing a query for the given ID- Parameters:
elementId
- the element id to get the range foroperation
- the operation- Returns:
- A List of Ranges that are required to return all elements that match the parameters of the query.
- Throws:
RangeFactoryException
- if a range could not be created
-
getRangeFromPair
org.apache.accumulo.core.data.Range getRangeFromPair(Pair<ElementId,ElementId> pairRange, GraphFilters operation) throws RangeFactoryException
Operation Returns a Range representing a query for all values between the givenElementId
s taken from the minimum comparable byte value of the provided keys and the maximum comparable byte value. Note that depending on the serialisation mechanism used and your key design the results of a range query will differ. The intent here is that values in your gaffer.accumulostore instance should be ordered within the table so that Entities with an Integer Identifier occur in the order 1 2 3So that a provided pair of 1 and 3 will return entities 1, 2 and 3.
- Parameters:
pairRange
- the pair of element ids to get the range foroperation
- the operation- Returns:
- A List of Ranges that are required to return all elements that match the parameters of the query.
- Throws:
RangeFactoryException
- if a range could not be created
-
-