Class SQLKeyValueStore

  • All Implemented Interfaces:
    KeyValueStore, KeyValueStoreProvider

    public class SQLKeyValueStore
    extends AbstractKeyValueStoreProvider
    SQL implementation of a Key/Value Store Provider.

    The following configuration properties are available:

    • datasource: the datasource to use.
    • table: the table to use. The default is the Store name.
    If a namespace is specified, it is used as a table name suffix, otherwise of the store name.

    This implementation uses a table with a KEY column (unique and not NULL), and for the value one of these three columns is used: LONG, STRING, BYTES. If possible LONG is used, then STRING, otherwise BYTES.

    The TTL is stored as an expiration time (seconds since epoch) in its own column. Expiration is done by a thread running a cleanup DELETE query every 60 seconds.

    Since:
    10.10