Package com.redis.om.spring
Class RedisEnhancedKeyValueAdapter
java.lang.Object
org.springframework.data.keyvalue.core.AbstractKeyValueAdapter
org.springframework.data.redis.core.RedisKeyValueAdapter
com.redis.om.spring.RedisEnhancedKeyValueAdapter
- 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 RedisEnhancedKeyValueAdapter
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
ConstructorsConstructorDescriptionRedisEnhancedKeyValueAdapter(org.springframework.data.redis.core.RedisOperations<?, ?> redisOps, RedisModulesOperations<?> rmo, RediSearchIndexer indexer, FeatureExtractor featureExtractor, RedisOMSpringProperties redisOMSpringProperties) Creates newRedisKeyValueAdapterwith defaultRedisMappingContextand defaultRedisCustomConversions.RedisEnhancedKeyValueAdapter(org.springframework.data.redis.core.RedisOperations<?, ?> redisOps, RedisModulesOperations<?> rmo, org.springframework.data.redis.core.mapping.RedisMappingContext mappingContext, RediSearchIndexer indexer, FeatureExtractor featureExtractor, RedisOMSpringProperties redisOMSpringProperties) Creates newRedisKeyValueAdapterwith defaultRedisCustomConversions.RedisEnhancedKeyValueAdapter(org.springframework.data.redis.core.RedisOperations<?, ?> redisOps, RedisModulesOperations<?> rmo, org.springframework.data.redis.core.mapping.RedisMappingContext mappingContext, org.springframework.data.convert.CustomConversions customConversions, RediSearchIndexer indexer, FeatureExtractor featureExtractor, RedisOMSpringProperties redisOMSpringProperties) Creates newRedisKeyValueAdapter. -
Method Summary
Modifier and TypeMethodDescriptionbooleanlong<T> TvoiddeleteAllOf(String keyspace) <T> T<T> List<T>Get all elements for given keyspace.protected Stringvoidupdate(org.springframework.data.redis.core.PartialUpdate<?> update) Methods 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, toBytesMethods 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
-
RedisEnhancedKeyValueAdapter
public RedisEnhancedKeyValueAdapter(org.springframework.data.redis.core.RedisOperations<?, ?> redisOps, RedisModulesOperations<?> rmo, RediSearchIndexer indexer, FeatureExtractor featureExtractor, RedisOMSpringProperties redisOMSpringProperties) Creates newRedisKeyValueAdapterwith defaultRedisMappingContextand defaultRedisCustomConversions.- Parameters:
redisOps- must not be null.rmo- must not be null.indexer- must not be null.
-
RedisEnhancedKeyValueAdapter
public RedisEnhancedKeyValueAdapter(org.springframework.data.redis.core.RedisOperations<?, ?> redisOps, RedisModulesOperations<?> rmo, org.springframework.data.redis.core.mapping.RedisMappingContext mappingContext, RediSearchIndexer indexer, FeatureExtractor featureExtractor, RedisOMSpringProperties redisOMSpringProperties) Creates newRedisKeyValueAdapterwith defaultRedisCustomConversions.- Parameters:
redisOps- must not be null.rmo- must not be null.mappingContext- must not be null.indexer- must not be null.
-
RedisEnhancedKeyValueAdapter
public RedisEnhancedKeyValueAdapter(org.springframework.data.redis.core.RedisOperations<?, ?> redisOps, RedisModulesOperations<?> rmo, org.springframework.data.redis.core.mapping.RedisMappingContext mappingContext, @Nullable org.springframework.data.convert.CustomConversions customConversions, RediSearchIndexer indexer, FeatureExtractor featureExtractor, RedisOMSpringProperties redisOMSpringProperties) Creates newRedisKeyValueAdapter.- Parameters:
redisOps- must not be null.rmo- must not be null.mappingContext- must not be null.customConversions- can be null.indexer- 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
-
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
-
getAllIds
-
getAllOf
Get all elements for given keyspace.- Overrides:
getAllOfin classorg.springframework.data.redis.core.RedisKeyValueAdapter- Type Parameters:
T- the target type- 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.
- Since:
- 2.5
-
update
public void update(org.springframework.data.redis.core.PartialUpdate<?> update) - Overrides:
updatein 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
-