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>, IndexingSortedStorageMixin<PK,​D,​F,​N>, IndexReader<PK,​D,​IK,​IE>, ManagedUniqueIndexNode<PK,​D,​IK,​IE,​IF>, MultiIndexNode<PK,​D,​IK,​IE>, 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, IndexingSortedMapStorageNode, ManualMultiIndexNode, ManualUniqueIndexNode, NoOpGroupQueueNode, NoOpIndexReader, NoOpNode, NoOpQueueNode, NoOpUniqueIndexNode, NoTxnManagedUniqueIndexNode, PhysicalIndexedSortedMapStorageAvailabilityAdapterFactory.PhysicalIndexedSortedMapStorageAvailabilityAdapter, PhysicalIndexedSortedMapStorageCallsiteAdapter, PhysicalIndexedSortedMapStorageCounterAdapter, PhysicalIndexedSortedMapStorageSanitizationAdapter, PhysicalIndexedSortedMapStorageSanitizationAdapter, PhysicalIndexedSortedMapStorageTraceAdapter, PhysicalSortedMapStorageAvailabilityAdapterFactory.PhysicalSortedMapStorageAvailabilityAdapter, PhysicalSortedMapStorageCallsiteAdapter, PhysicalSortedMapStorageCounterAdapter, PhysicalSortedMapStorageSanitizationAdapter, PhysicalSortedMapStorageTraceAdapter, PhysicalSubEntitySortedMapStorageAvailabilityAdapterFactory.PhysicalSubEntitySortedMapStorageAvailabilityAdapter, PhysicalSubEntitySortedMapStorageCallsiteAdapter, PhysicalSubEntitySortedMapStorageCounterAdapter, PhysicalSubEntitySortedMapStorageSanitizationAdapter, 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
  • Field Details

  • 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

      default io.datarouter.scanner.Scanner<D> scan​(io.datarouter.util.tuple.Range<PK> range)
    • scan

      default io.datarouter.scanner.Scanner<D> scan​(Config config)
    • scan

      default io.datarouter.scanner.Scanner<D> 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

      default io.datarouter.scanner.Scanner<PK> scanKeys​(io.datarouter.util.tuple.Range<PK> range, Config config)
    • scanKeys

      default io.datarouter.scanner.Scanner<PK> scanKeys​(io.datarouter.util.tuple.Range<PK> range)
    • scanKeys

      default io.datarouter.scanner.Scanner<PK> scanKeys​(Config config)
    • scanKeys

      default io.datarouter.scanner.Scanner<PK> scanKeys()
    • scanWithPrefix

      default io.datarouter.scanner.Scanner<D> scanWithPrefix​(PK prefix, Config config)
    • scanWithPrefix

      default io.datarouter.scanner.Scanner<D> scanWithPrefix​(PK prefix)
    • scanKeysWithPrefix

      default io.datarouter.scanner.Scanner<PK> scanKeysWithPrefix​(PK prefix, Config config)
    • scanKeysWithPrefix

      default io.datarouter.scanner.Scanner<PK> scanKeysWithPrefix​(PK prefix)
    • scanWithPrefixes

      default io.datarouter.scanner.Scanner<D> scanWithPrefixes​(Collection<PK> prefixes, Config config)
    • scanWithPrefixes

      default io.datarouter.scanner.Scanner<D> scanWithPrefixes​(Collection<PK> prefixes)
    • scanKeysWithPrefixes

      default io.datarouter.scanner.Scanner<PK> scanKeysWithPrefixes​(Collection<PK> prefixes, Config config)
    • scanKeysWithPrefixes

      default io.datarouter.scanner.Scanner<PK> scanKeysWithPrefixes​(Collection<PK> prefixes)
    • count

      default long count​(io.datarouter.util.tuple.Range<PK> range)
    • getRangesFromPrefixes

      static <PK extends io.datarouter.model.key.primary.PrimaryKey<PK>> List<io.datarouter.util.tuple.Range<PK>> getRangesFromPrefixes​(Collection<PK> prefixes)