Package com.redis.vl.storage
Class JsonStorage
java.lang.Object
com.redis.vl.storage.BaseStorage
com.redis.vl.storage.JsonStorage
Internal subclass of BaseStorage for the Redis JSON data type.
Implements json-specific logic for validation and read/write operations in Redis.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.redis.vl.storage.BaseStorage
BaseStorage.KeyValuePair -
Field Summary
Fields inherited from class com.redis.vl.storage.BaseStorage
defaultBatchSize, indexSchema -
Constructor Summary
ConstructorsConstructorDescriptionJsonStorage(IndexSchema indexSchema) Creates a new JsonStorage instance for managing Redis JSON data structures. -
Method Summary
Modifier and TypeMethodDescriptionconvertBytes(Map<String, Object> map) Convert byte arrays in the map to appropriate types.getResponse(Pipeline pipeline, String key) Get a response for retrieving a value from Redis using a pipeline.protected voidSet a key-value pair in Redis using a pipeline.Methods inherited from class com.redis.vl.storage.BaseStorage
createKey, createKeyForObject, get, get, getIndexSchema, getKeys, preprocessAndValidateObjects, preprocessObject, validate, write, write, write, write, write, write
-
Constructor Details
-
JsonStorage
Creates a new JsonStorage instance for managing Redis JSON data structures.- Parameters:
indexSchema- The index schema defining the structure of data to be stored
-
-
Method Details
-
set
Description copied from class:BaseStorageSet a key-value pair in Redis using a pipeline.- Specified by:
setin classBaseStorage- Parameters:
pipeline- The Redis pipeline to usekey- The Redis keyobj- The object to store
-
getResponse
Description copied from class:BaseStorageGet a response for retrieving a value from Redis using a pipeline.- Specified by:
getResponsein classBaseStorage- Parameters:
pipeline- The Redis pipeline to usekey- The Redis key- Returns:
- Response containing the retrieved object
-
convertBytes
Description copied from class:BaseStorageConvert byte arrays in the map to appropriate types.- Overrides:
convertBytesin classBaseStorage- Parameters:
map- Map with potential byte arrays- Returns:
- Map with converted values
-