Interface RedisJsonOperations<K>
- Type Parameters:
K- the Redis key type.
- All Superinterfaces:
JsonOperations<K>
- All Known Implementing Classes:
RedisJsonTemplate
Interface that specifies Redis JSON operations.
Implemented by RedisJsonTemplate. Not often used directly, but a useful option to enhance testability, as it
can easily be mocked or stubbed.
Specification objects are immutable and can be used to build up complex queries.
JSON path expressions follow the
RedisJSON version 2 path
syntax. Unless specified otherwise, results are positionally correlated to matching paths: each element in the
returned List corresponds to a matching path, with null indicating that the matched value has an
incompatible JSON type.
- Since:
- 4.2
- Author:
- Yordan Tsintsov, Mark Paluch
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDelete operations for a single key.static interfaceDelete operations for one or many keys.static interfaceSpecification for key-bound operations for a single key.static interfaceSpecification for key-bound operations for one or many keys.Nested classes/interfaces inherited from interface JsonOperations
JsonOperations.JsonArrayAtIndex, JsonOperations.JsonArraySpec, JsonOperations.JsonAtKeySpec, JsonOperations.JsonAtKeysSpec, JsonOperations.JsonBooleanSpec, JsonOperations.JsonKeySupport<P>, JsonOperations.JsonMultiGetSpec, JsonOperations.JsonPathResult, JsonOperations.JsonResult, JsonOperations.JsonResults, JsonOperations.JsonSet<T,S>, JsonOperations.JsonSetSpec, JsonOperations.JsonStringSpec, JsonOperations.PathSpec<P> -
Method Summary
Modifier and TypeMethodDescriptionstatic RedisJsonOperations<String> create(RedisConnectionFactory connectionFactory) Create a newRedisJsonOperationsusing the givenRedisConnectionFactoryand default serializers for usage withStringkeys.default BooleanDelete givenkey.Start building a key-bound operation for the givenkey.keys(Collection<K> keys) Start building a key-bound operation for the givenkeys.default RedisJsonOperations.KeysSpecStart building a key-bound operation for the givenkeys.
-
Method Details
-
delete
-
key
Start building a key-bound operation for the givenkey.- Parameters:
key- must not be null.- Returns:
- a spec for specifying the key-bound operation.
-
keys
Start building a key-bound operation for the givenkeys.- Parameters:
keys- must not be null.- Returns:
- a spec for specifying the key-bound operation.
-
keys
Start building a key-bound operation for the givenkeys.- Parameters:
keys- must not be null.- Returns:
- a spec for specifying the key-bound operation.
-
create
Create a newRedisJsonOperationsusing the givenRedisConnectionFactoryand default serializers for usage withStringkeys.- Parameters:
connectionFactory- the connection factory to use.- Returns:
- a new
RedisJsonOperationsinstance.
-