@JvmStatic fun <K, V> open(jdbcUrl: String, keySerializer: (K) -> Bytes, valueSerializer: (V) -> Bytes, keyDeserializer: (Bytes) -> K, valueDeserializer: (Bytes?) -> V?): SQLKeyValueStore<K, V>
(source)
Open a relational database backed key-value store.
jdbcUrl
- The JDBC url to connect to the database.
keySerializer
- the serializer of key objects to bytes
valueSerializer
- the serializer of value objects to bytes
keyDeserializer
- the deserializer of keys from bytes
valueDeserializer
- the deserializer of values from bytes
IOException
- If an I/O error occurs.
Return
A key-value store.
@JvmStatic fun <K, V> open(jdbcUrl: String, tableName: String, keyColumn: String, valueColumn: String, keySerializer: (K) -> Bytes, valueSerializer: (V) -> Bytes, keyDeserializer: (Bytes) -> K, valueDeserializer: (Bytes?) -> V?): SQLKeyValueStore<K, V>
(source)
Open a relational database backed key-value store.
jdbcUrl
- The JDBC url to connect to the database.
tableName
- the name of the table to use for storage.
keyColumn
- the key column of the store.
valueColumn
- the value column of the store.
keySerializer
- the serializer of key objects to bytes
valueSerializer
- the serializer of value objects to bytes
keyDeserializer
- the deserializer of keys from bytes
valueDeserializer
- the deserializer of values from bytes
IOException
- If an I/O error occurs.
Return
A key-value store.