public class RedisMetadataStore extends Object implements MetadataStore
MetadataStore
. Use this MetadataStore
to achieve meta-data persistence across application restarts.Constructor and Description |
---|
RedisMetadataStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
|
RedisMetadataStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory,
String key)
Initializes the
RedisProperties by provided RedisConnectionFactory and key. |
RedisMetadataStore(org.springframework.data.redis.core.RedisOperations<String,?> operations)
|
RedisMetadataStore(org.springframework.data.redis.core.RedisOperations<String,?> operations,
String key)
Initializes the
RedisProperties by provided RedisConnectionFactory and key. |
RedisMetadataStore(org.springframework.data.redis.support.collections.RedisProperties properties)
Specifies the
RedisProperties backend for this MetadataStore . |
Modifier and Type | Method and Description |
---|---|
String |
get(String key)
Retrieve the persisted value for the provided key.
|
void |
put(String key,
String value)
Persists the provided key and value to Redis.
|
String |
remove(String key)
Remove a value for the given key from this MetadataStore.
|
public static final String KEY
public RedisMetadataStore(org.springframework.data.redis.support.collections.RedisProperties properties)
RedisProperties
backend for this MetadataStore
.public RedisMetadataStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
public RedisMetadataStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, String key)
RedisProperties
by provided RedisConnectionFactory
and key.public RedisMetadataStore(org.springframework.data.redis.core.RedisOperations<String,?> operations)
public void put(String key, String value)
put
in interface MetadataStore
key
- Must not be nullvalue
- Must not be nullpublic String get(String key)
get
in interface MetadataStore
key
- Must not be nullpublic String remove(String key)
MetadataStore
remove
in interface MetadataStore
Copyright © 2017. All rights reserved.