com.thinkaurelius.titan.diskstorage.keycolumnvalue.ttl

## Class TTLKVCSManager

- java.lang.Object
- - com.thinkaurelius.titan.diskstorage.keycolumnvalue.KCVSManagerProxy
  - - com.thinkaurelius.titan.diskstorage.keycolumnvalue.ttl.TTLKVCSManager

- All Implemented Interfaces:
    CustomizeStoreKCVSManager, KeyColumnValueStoreManager, StoreManager

      public class TTLKVCSManager
      extends KCVSManagerProxy
      implements CustomizeStoreKCVSManager

  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Field Summary

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

      `manager`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TTLKVCSManager(KeyColumnValueStoreManager manager, int defaultTTL)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `applyTTL(Collection<Entry> additions, int ttl)`
    `StoreFeatures` | `getFeatures()` Returns the features supported by this storage manager
    `void` | `mutateMany(Map<String,Map<StaticBuffer,KCVMutation>> mutations, StoreTransaction txh)` Executes multiple mutations at once.
    `KeyColumnValueStore` | `openDatabase(String name)` Opens an ordered database by the given name.
    `KeyColumnValueStore` | `openDatabase(String name, int ttlInSeconds)` Opens a database against this `KeyColumnValueStoreManager` with the given TTL in seconds.
    `void` | `setTTL(String storeName, int ttl)`
    `static boolean` | `supportsStoreTTL(KeyColumnValueStoreManager manager)`
    `static boolean` | `supportsStoreTTL(StoreFeatures features)`

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

      `beginTransaction, clearStorage, close, getLocalKeyPartition, getName`

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

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

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

      `beginTransaction, clearStorage, close, getLocalKeyPartition, getName`

- - ### Constructor Detail

    - #### TTLKVCSManager

          public TTLKVCSManager(KeyColumnValueStoreManager manager,
                        int defaultTTL)

  - ### Method Detail

    - #### supportsStoreTTL

          public static boolean supportsStoreTTL(KeyColumnValueStoreManager manager)

    - #### supportsStoreTTL

          public static boolean supportsStoreTTL(StoreFeatures features)

    - #### setTTL

          public void setTTL(String storeName,
                    int ttl)

    - #### getFeatures

          public StoreFeatures getFeatures()

      Description copied from interface: `StoreManager`
      Returns the features supported by this storage manager
      Specified by:
        `getFeatures` in interface `StoreManager`
      Overrides:
        `getFeatures` in class `KCVSManagerProxy`
      Returns:
        The supported features of this storage manager
      See Also:
        `StoreFeatures`

    - #### openDatabase

          public KeyColumnValueStore openDatabase(String name)
                                           throws BackendException

      Description copied from interface: `KeyColumnValueStoreManager`
      Opens an ordered database by the given name. If the database does not exist, it is created. If it has already been opened, the existing handle is returned.
      Specified by:
        `openDatabase` in interface `KeyColumnValueStoreManager`
      Overrides:
        `openDatabase` in class `KCVSManagerProxy`
      Parameters:
        `name` - Name of database
      Returns:
        Database Handle
      Throws:
        `BackendException`

    - #### openDatabase

          public KeyColumnValueStore openDatabase(String name,
                                         int ttlInSeconds)
                                           throws BackendException

      Description copied from interface: `CustomizeStoreKCVSManager`
      Opens a database against this `KeyColumnValueStoreManager` with the given TTL in seconds.
      Specified by:
        `openDatabase` in interface `CustomizeStoreKCVSManager`
      Parameters:
        `name` - Name of database
        `ttlInSeconds` - TTL for the entries in this `KeyColumnValueStore`
      Returns:
        Database Handle
      Throws:
        `BackendException`
      See Also:
        `KeyColumnValueStoreManager.openDatabase(String)`

    - #### mutateMany

          public void mutateMany(Map<String,Map<StaticBuffer,KCVMutation>> mutations,
                        StoreTransaction txh)
                          throws BackendException

      Description copied from interface: `KeyColumnValueStoreManager`
      Executes multiple mutations at once. For each store (identified by a string name) there is a map of (key,mutation) pairs that specifies all the mutations to execute against the particular store for that key. This is an optional operation. Check `StoreManager.getFeatures()` if it is supported by a particular implementation.
      Specified by:
        `mutateMany` in interface `KeyColumnValueStoreManager`
      Overrides:
        `mutateMany` in class `KCVSManagerProxy`
      Throws:
        `BackendException`

    - #### applyTTL

          public static void applyTTL(Collection<Entry> additions,
                      int ttl)

Copyright © 2012–2014. All rights reserved.