com.thinkaurelius.titan.diskstorage.keycolumnvalue.keyvalue

## Interface OrderedKeyValueStore

- All Superinterfaces:
    KeyValueStore

      public interface OrderedKeyValueStore
      extends KeyValueStore

  A `KeyValueStore` where the keys are ordered such that keys can be retrieved in order.
  Author:
    Matthias Bröcheler (me@matthiasb.com);

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `RecordIterator<KeyValueEntry>` | `getSlice(KVQuery query, StoreTransaction txh)` Returns a list of all Key-value pairs (`KeyValueEntry` where the keys satisfy the given `KVQuery`.
    `Map<KVQuery,RecordIterator<KeyValueEntry>>` | `getSlices(List<KVQuery> queries, StoreTransaction txh)` Like `getSlice(KVQuery, com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreTransaction)` but executes all of the given queries at once and returns a map of all the result sets of each query.
    `void` | `insert(StaticBuffer key, StaticBuffer value, StoreTransaction txh)` Inserts the given key-value pair into the store.

    - ### Methods inherited from interface com.thinkaurelius.titan.diskstorage.keycolumnvalue.keyvalue.KeyValueStore

      `acquireLock, close, containsKey, delete, get, getName`

- - ### Method Detail

    - #### insert

          void insert(StaticBuffer key,
                    StaticBuffer value,
                    StoreTransaction txh)
                      throws BackendException

      Inserts the given key-value pair into the store. If the key already exists, its value is overwritten by the given one.
      Parameters:
        `key` -
        `value` -
        `txh` -
      Throws:
        `BackendException`

    - #### getSlice

          RecordIterator<KeyValueEntry> getSlice(KVQuery query,
                                               StoreTransaction txh)
                                                 throws BackendException

      Returns a list of all Key-value pairs (`KeyValueEntry` where the keys satisfy the given `KVQuery`. That means, the key lies between the query's start and end buffers, satisfied the filter condition (if any) and the position of the result in the result list iterator is less than the given limit. The operation is executed inside the context of the given transaction.
      Parameters:
        `query` -
        `txh` -
      Returns:
      Throws:
        `BackendException`

    - #### getSlices

          Map<KVQuery,RecordIterator<KeyValueEntry>> getSlices(List<KVQuery> queries,
                                                             StoreTransaction txh)
                                                               throws BackendException

      Like `getSlice(KVQuery, com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreTransaction)` but executes all of the given queries at once and returns a map of all the result sets of each query. Only supported when the given store implementation supports multi-query, i.e. `StoreFeatures.hasMultiQuery()` return true. Otherwise this method may throw a `UnsupportedOperationException`.
      Parameters:
        `queries` -
        `txh` -
      Returns:
      Throws:
        `BackendException`

Copyright © 2012–2014. All rights reserved.