com.thinkaurelius.titan.diskstorage.keycolumnvalue.keyvalue

## Interface KeyValueStore

- All Known Subinterfaces:
    OrderedKeyValueStore

      public interface KeyValueStore

  Interface for a data store that represents data in the simple key->value data model where each key is uniquely associated with a value. Keys and values are generic ByteBuffers.
  Author:
    Matthias Bröcheler (me@matthiasb.com);

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `acquireLock(StaticBuffer key, StaticBuffer expectedValue, StoreTransaction txh)` Acquires a lock for the given key and expected value (null, if not value is expected).
    `void` | `close()` Closes this store and releases its resources.
    `boolean` | `containsKey(StaticBuffer key, StoreTransaction txh)` Returns true iff the store contains the given key, else false
    `void` | `delete(StaticBuffer key, StoreTransaction txh)` Deletes the given key from the store.
    `StaticBuffer` | `get(StaticBuffer key, StoreTransaction txh)` Returns the value associated with the given key.
    `String` | `getName()` Returns the name of this store

- - ### Method Detail

    - #### delete

          void delete(StaticBuffer key,
                    StoreTransaction txh)
                      throws BackendException

      Deletes the given key from the store.
      Parameters:
        `key` -
        `txh` -
      Throws:
        `BackendException`

    - #### get

          StaticBuffer get(StaticBuffer key,
                         StoreTransaction txh)
                           throws BackendException

      Returns the value associated with the given key.
      Parameters:
        `key` -
        `txh` -
      Returns:
      Throws:
        `BackendException`

    - #### containsKey

          boolean containsKey(StaticBuffer key,
                            StoreTransaction txh)
                              throws BackendException

      Returns true iff the store contains the given key, else false
      Parameters:
        `key` -
        `txh` -
      Returns:
      Throws:
        `BackendException`

    - #### acquireLock

          void acquireLock(StaticBuffer key,
                         StaticBuffer expectedValue,
                         StoreTransaction txh)
                           throws BackendException

      Acquires a lock for the given key and expected value (null, if not value is expected).
      Parameters:
        `key` -
        `expectedValue` -
        `txh` -
      Throws:
        `BackendException`

    - #### getName

          String getName()

      Returns the name of this store
      Returns:

    - #### close

          void close()
                     throws BackendException

      Closes this store and releases its resources.
      Throws:
        `BackendException`

Copyright © 2012–2014. All rights reserved.