Package com.redis.om.spring
Class RedisJSONKeyValueAdapter
java.lang.Object
org.springframework.data.keyvalue.core.AbstractKeyValueAdapter
org.springframework.data.redis.core.RedisKeyValueAdapter
com.redis.om.spring.RedisJSONKeyValueAdapter
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.data.redis.core.RedisKeyspaceEvent>,org.springframework.data.keyvalue.core.KeyValueAdapter
public class RedisJSONKeyValueAdapter
extends org.springframework.data.redis.core.RedisKeyValueAdapter
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.data.redis.core.RedisKeyValueAdapter
org.springframework.data.redis.core.RedisKeyValueAdapter.EnableKeyspaceEvents, org.springframework.data.redis.core.RedisKeyValueAdapter.ShadowCopy -
Constructor Summary
ConstructorsConstructorDescriptionRedisJSONKeyValueAdapter(org.springframework.data.redis.core.RedisOperations<?, ?> redisOps, RedisModulesOperations<?> rmo, org.springframework.data.redis.core.mapping.RedisMappingContext mappingContext, RediSearchIndexer keyspaceToIndexMap, com.google.gson.GsonBuilder gsonBuilder, RedisOMSpringProperties redisOMSpringProperties) Creates newRedisKeyValueAdapterwith defaultRedisCustomConversions. -
Method Summary
Modifier and TypeMethodDescriptionbooleanlong<T> TvoiddeleteAllOf(String keyspace) <T> T<T> TgetAllKeys(String keyspace, Class<T> type) <T> List<T>Get all elements for given keyspace.protected StringMethods inherited from class org.springframework.data.redis.core.RedisKeyValueAdapter
afterPropertiesSet, clear, createKey, delete, destroy, entries, execute, get, getAllOf, getAllOf, getConverter, onApplicationEvent, setApplicationContext, setEnableKeyspaceEvents, setKeyspaceNotificationsConfigParameter, setMessageListenerContainer, setShadowCopy, toBytes, updateMethods inherited from class org.springframework.data.keyvalue.core.AbstractKeyValueAdapter
count, find, find, getQueryEngineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.keyvalue.core.KeyValueAdapter
entries, exists
-
Constructor Details
-
RedisJSONKeyValueAdapter
public RedisJSONKeyValueAdapter(org.springframework.data.redis.core.RedisOperations<?, ?> redisOps, RedisModulesOperations<?> rmo, org.springframework.data.redis.core.mapping.RedisMappingContext mappingContext, RediSearchIndexer keyspaceToIndexMap, com.google.gson.GsonBuilder gsonBuilder, RedisOMSpringProperties redisOMSpringProperties) Creates newRedisKeyValueAdapterwith defaultRedisCustomConversions.- Parameters:
redisOps- must not be null.rmo- must not be null.mappingContext- must not be null.keyspaceToIndexMap- must not be null.
-
-
Method Details
-
put
- Specified by:
putin interfaceorg.springframework.data.keyvalue.core.KeyValueAdapter- Overrides:
putin classorg.springframework.data.redis.core.RedisKeyValueAdapter
-
get
- Specified by:
getin interfaceorg.springframework.data.keyvalue.core.KeyValueAdapter- Overrides:
getin classorg.springframework.data.redis.core.RedisKeyValueAdapter
-
get
-
getAllOf
Get all elements for given keyspace.- Overrides:
getAllOfin classorg.springframework.data.redis.core.RedisKeyValueAdapter- Parameters:
keyspace- the keyspace to fetch entities from.type- the desired target type.offset- index value to start reading.rows- maximum number of entities to return.- Returns:
- never null.
-
getAllKeys
-
delete
- Specified by:
deletein interfaceorg.springframework.data.keyvalue.core.KeyValueAdapter- Overrides:
deletein classorg.springframework.data.redis.core.RedisKeyValueAdapter
-
deleteAllOf
- Specified by:
deleteAllOfin interfaceorg.springframework.data.keyvalue.core.KeyValueAdapter- Overrides:
deleteAllOfin classorg.springframework.data.redis.core.RedisKeyValueAdapter
-
count
- Specified by:
countin interfaceorg.springframework.data.keyvalue.core.KeyValueAdapter- Overrides:
countin classorg.springframework.data.redis.core.RedisKeyValueAdapter
-
contains
- Specified by:
containsin interfaceorg.springframework.data.keyvalue.core.KeyValueAdapter- Overrides:
containsin classorg.springframework.data.redis.core.RedisKeyValueAdapter
-
getKey
-