Interface SortedStorageReader<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>>
- All Superinterfaces:
NodeOps<PK,D>
- All Known Subinterfaces:
IndexedSortedMapStorage<PK,,D> IndexedSortedMapStorage.IndexedSortedMapStorageNode<PK,,D, F> IndexedSortedMapStorage.PhysicalIndexedSortedMapStorageNode<PK,,D, F> IndexedSortedMapStorageReader<PK,,D> IndexedSortedMapStorageReader.IndexedSortedMapStorageReaderNode<PK,,D, F> IndexedSortedMapStorageReader.PhysicalIndexedSortedMapStorageReaderNode<PK,,D, F> IndexReader<PK,,D, IK, IE> ManagedUniqueIndexNode<PK,,D, IK, IE, IF> MultiIndexReader<PK,,D, IK, IE> PhysicalSortedStorageAvailabilityAdapterMixin<PK,,D, F, N> PhysicalSubEntitySortedMapStorageNode<EK,,PK, D, F> SortedMapStorage<PK,,D> SortedMapStorage.PhysicalSortedMapStorageNode<PK,,D, F> SortedMapStorage.SortedMapStorageNode<PK,,D, F> SortedMapStorageReader<PK,,D> SortedMapStorageReader.PhysicalSortedMapStorageReaderNode<PK,,D, F> SortedMapStorageReader.SortedMapStorageReaderNode<PK,,D, F> SortedStorage<PK,,D> SortedStorage.PhysicalSortedStorageNode<PK,,D, F> SortedStorage.SortedStorageNode<PK,,D, F> SortedStorageCounterAdapterMixin<PK,,D, F, N> SortedStorageReader.PhysicalSortedStorageReaderNode<PK,,D, F> SortedStorageReader.SortedStorageReaderNode<PK,,D, F> SortedStorageReaderCallsiteAdapterMixin<PK,,D, F, N> SortedStorageSanitizationAdapterMixin<PK,,D, F, N> SortedStorageTraceAdapterMixin<PK,,D, F, N> SubEntitySortedMapStorageNode<EK,,PK, D, F> SubEntitySortedMapStorageReaderNode<EK,,PK, D, F> UniqueIndexNode<PK,,D, IK, IE> UniqueIndexReader<PK,D, IK, IE>
- All Known Implementing Classes:
IndexedSortedMapStorageCallsiteAdapter,IndexedSortedMapStorageCounterAdapter,NoOpGroupQueueNode,NoOpIndexReader,NoOpNode,NoOpQueueNode,NoTxnManagedUniqueIndexNode,PhysicalIndexedSortedMapStorageAvailabilityAdapterFactory.PhysicalIndexedSortedMapStorageAvailabilityAdapter,PhysicalIndexedSortedMapStorageCallsiteAdapter,PhysicalIndexedSortedMapStorageCounterAdapter,PhysicalIndexedSortedMapStorageSanitizationAdapter,PhysicalIndexedSortedMapStorageTraceAdapter,PhysicalSortedMapStorageAvailabilityAdapterFactory.PhysicalSortedMapStorageAvailabilityAdapter,PhysicalSortedMapStorageCallsiteAdapter,PhysicalSortedMapStorageCounterAdapter,PhysicalSortedMapStorageSanitizationAdapter,PhysicalSortedMapStorageTraceAdapter,PhysicalSubEntitySortedMapStorageCallsiteAdapter,PhysicalSubEntitySortedMapStorageCounterAdapter,PhysicalSubEntitySortedMapStorageTraceAdapter,SortedMapStorageCallsiteAdapter,SortedMapStorageCounterAdapter,TxnManagedUniqueIndexNode
public interface SortedStorageReader<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>>
extends NodeOps<PK,D>
Methods for reading from storage mechanisms that keep databeans sorted by PrimaryKey. Similar to java's TreeMap.
Possible implementations include TreeMap, RDBMS, HBase, LevelDB, Google Cloud Datastore, Google Cloud BigTable, etc
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceSortedStorageReader.PhysicalSortedStorageReaderNode<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>> static interfaceSortedStorageReader.SortedStorageReaderNode<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault longstatic <PK extends io.datarouter.model.key.primary.PrimaryKey<PK>>
List<io.datarouter.util.tuple.Range<PK>>getRangesFromPrefixes(Collection<PK> prefixes) default io.datarouter.scanner.Scanner<D>scan()default io.datarouter.scanner.Scanner<D>default io.datarouter.scanner.Scanner<D>default io.datarouter.scanner.Scanner<D>The scan method accepts a Range<PK> which identifies the startKey and endKey, and returns all contiguous rows between them, not skipping or filtering any.default io.datarouter.scanner.Scanner<PK>scanKeys()default io.datarouter.scanner.Scanner<PK>default io.datarouter.scanner.Scanner<PK>default io.datarouter.scanner.Scanner<PK>default io.datarouter.scanner.Scanner<PK>scanKeysWithPrefix(PK prefix) default io.datarouter.scanner.Scanner<PK>scanKeysWithPrefix(PK prefix, Config config) default io.datarouter.scanner.Scanner<PK>scanKeysWithPrefixes(Collection<PK> prefixes) default io.datarouter.scanner.Scanner<PK>scanKeysWithPrefixes(Collection<PK> prefixes, Config config) default io.datarouter.scanner.Scanner<D>scanRanges(Collection<io.datarouter.util.tuple.Range<PK>> ranges) io.datarouter.scanner.Scanner<D>scanRanges(Collection<io.datarouter.util.tuple.Range<PK>> ranges, Config config) default io.datarouter.scanner.Scanner<PK>scanRangesKeys(Collection<io.datarouter.util.tuple.Range<PK>> ranges) io.datarouter.scanner.Scanner<PK>scanRangesKeys(Collection<io.datarouter.util.tuple.Range<PK>> ranges, Config config) default io.datarouter.scanner.Scanner<D>scanWithPrefix(PK prefix) default io.datarouter.scanner.Scanner<D>scanWithPrefix(PK prefix, Config config) default io.datarouter.scanner.Scanner<D>scanWithPrefixes(Collection<PK> prefixes) default io.datarouter.scanner.Scanner<D>scanWithPrefixes(Collection<PK> prefixes, Config config)
-
Field Details
-
OP_getKeysInRange
- See Also:
-
OP_getRange
- See Also:
-
OP_getPrefixedRange
- See Also:
-
OP_scanKeys
- See Also:
-
OP_scanRangesKeys
- See Also:
-
OP_scan
- See Also:
-
OP_scanRanges
- See Also:
-
-
Method Details
-
scanRanges
io.datarouter.scanner.Scanner<D> scanRanges(Collection<io.datarouter.util.tuple.Range<PK>> ranges, Config config) -
scanRanges
default io.datarouter.scanner.Scanner<D> scanRanges(Collection<io.datarouter.util.tuple.Range<PK>> ranges) -
scan
default io.datarouter.scanner.Scanner<D> scan(io.datarouter.util.tuple.Range<PK> range, Config config) The scan method accepts a Range<PK> which identifies the startKey and endKey, and returns all contiguous rows between them, not skipping or filtering any. Implementations will generally query the database in batches to avoid long transactions and huge result sets.
When providing startKey and endKey, implementations will ignore fields after the first null. For example, when scanning a phone book with startKey:
* (null, null) is valid and will start at the beginning of the book
* (Corgan, null) is valid and will start at the first Corgan
* (Corgan, Matt) is valid and will start at Corgan, Matt
* (null, Matt) is invalid. The Matt is ignored, so it is equivalent to (null, null)
Note that (null, Matt) will NOT do any filtering for rows with firstName=Matt. To avoid tablescans we are returning all rows in the range to the client where the client can then filter. A predicate push-down feature may be added, but it will likely use a separate interface method. -
scan
-
scan
-
scan
-
scanRangesKeys
io.datarouter.scanner.Scanner<PK> scanRangesKeys(Collection<io.datarouter.util.tuple.Range<PK>> ranges, Config config) -
scanRangesKeys
default io.datarouter.scanner.Scanner<PK> scanRangesKeys(Collection<io.datarouter.util.tuple.Range<PK>> ranges) -
scanKeys
-
scanKeys
-
scanKeys
-
scanKeys
-
scanWithPrefix
-
scanWithPrefix
-
scanKeysWithPrefix
-
scanKeysWithPrefix
-
scanWithPrefixes
-
scanWithPrefixes
-
scanKeysWithPrefixes
default io.datarouter.scanner.Scanner<PK> scanKeysWithPrefixes(Collection<PK> prefixes, Config config) -
scanKeysWithPrefixes
-
count
-
getRangesFromPrefixes
static <PK extends io.datarouter.model.key.primary.PrimaryKey<PK>> List<io.datarouter.util.tuple.Range<PK>> getRangesFromPrefixes(Collection<PK> prefixes)
-