com.thinkaurelius.titan.diskstorage.keycolumnvalue.ttl

## Class TTLKCVS

- java.lang.Object
- - com.thinkaurelius.titan.diskstorage.keycolumnvalue.KCVSProxy
  - - com.thinkaurelius.titan.diskstorage.keycolumnvalue.ttl.TTLKCVS

- All Implemented Interfaces:
    KeyColumnValueStore

      public class TTLKCVS
      extends KCVSProxy

  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Field Summary

    - ### Fields inherited from class com.thinkaurelius.titan.diskstorage.keycolumnvalue.KCVSProxy

      `store`

    - ### Fields inherited from interface com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeyColumnValueStore

      `NO_ADDITIONS, NO_DELETIONS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TTLKCVS(KeyColumnValueStore store, int ttl)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `mutate(StaticBuffer key, List<Entry> additions, List<StaticBuffer> deletions, StoreTransaction txh)` Verifies acquisition of locks `txh` from previous calls to `KeyColumnValueStore.acquireLock(StaticBuffer, StaticBuffer, StaticBuffer, StoreTransaction)` , then writes supplied `additions` and/or `deletions` to `key` in the underlying data store.

    - ### Methods inherited from class com.thinkaurelius.titan.diskstorage.keycolumnvalue.KCVSProxy

      `acquireLock, close, getKeys, getKeys, getName, getSlice, getSlice, unwrapTx`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TTLKCVS

          public TTLKCVS(KeyColumnValueStore store,
                 int ttl)

  - ### Method Detail

    - #### mutate

          public void mutate(StaticBuffer key,
                    List<Entry> additions,
                    List<StaticBuffer> deletions,
                    StoreTransaction txh)
                      throws BackendException

      Description copied from interface: `KeyColumnValueStore`
      Verifies acquisition of locks `txh` from previous calls to `KeyColumnValueStore.acquireLock(StaticBuffer, StaticBuffer, StaticBuffer, StoreTransaction)` , then writes supplied `additions` and/or `deletions` to `key` in the underlying data store. Deletions are applied strictly before additions. In other words, if both an addition and deletion are supplied for the same column, then the column will first be deleted and then the supplied Entry for the column will be added.

      Implementations which don't support locking should skip the initial lock verification step but otherwise behave as described above.
      Specified by:
        `mutate` in interface `KeyColumnValueStore`
      Overrides:
        `mutate` in class `KCVSProxy`
      Parameters:
        `key` - the key under which the columns in `additions` and `deletions` will be written
        `additions` - the list of Entry instances representing column-value pairs to create under `key`, or null to add no column-value pairs
        `deletions` - the list of columns to delete from `key`, or null to delete no columns
        `txh` - the transaction to use
      Throws:
        `PermanentLockingException` - if locking is supported by the implementation and at least one lock acquisition attempted by `KeyColumnValueStore.acquireLock(StaticBuffer, StaticBuffer, StaticBuffer, StoreTransaction)` has failed
        `BackendException`

Copyright © 2012–2014. All rights reserved.