Package org.redisson.api
Interface RVectorSetAsync
- All Superinterfaces:
RExpirableAsync
,RObjectAsync
- All Known Subinterfaces:
RVectorSet
- All Known Implementing Classes:
RedissonVectorSet
Async interface for Redis Vector Set
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionaddAsync
(VectorAddArgs args) Adds an element to the vector set asynchronouslyReturns the dimension of vectors in the vector set asynchronously<T> RFuture
<T> getAttributesAsync
(String element, Class<T> clazz) Retrieves attributes of a vector set element asynchronouslyReturns metadata and internal details about the vector set asynchronouslygetNeighborEntriesAsync
(String element) Retrieves the neighbors of a specified element with scores asynchronouslygetNeighborsAsync
(String element) Retrieves the neighbors of a specified element asynchronouslygetRawVectorAsync
(String element) Retrieves the raw vector associated with an element asynchronouslyRetrieves elements similar to a given vector or element asynchronouslyRetrieves elements similar to a given vector or element with scores asynchronouslygetVectorAsync
(String element) Retrieves the vector associated with an element asynchronouslyReturns a random element from the vector set asynchronouslyrandomAsync
(int count) Returns multiple random elements from the vector set asynchronouslyremoveAsync
(String element) Removes an element from the vector set asynchronouslysetAttributesAsync
(String element, Object attributes) Sets attributes for a vector set element asynchronouslyReturns the number of elements in the vector set asynchronouslyMethods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsync
Methods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, copyAsync, deleteAsync, dumpAsync, getAccessFrequencyAsync, getIdleTimeAsync, getInternalEncodingAsync, getReferenceCountAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Method Details
-
addAsync
Adds an element to the vector set asynchronously- Parameters:
args
- vector add arguments- Returns:
true
if element was added andfalse
if updated
-
sizeAsync
Returns the number of elements in the vector set asynchronously- Returns:
- cardinality of the vector set
-
dimensionsAsync
Returns the dimension of vectors in the vector set asynchronously- Returns:
- dimension count
-
getVectorAsync
Retrieves the vector associated with an element asynchronously- Parameters:
element
- element name- Returns:
- list of vector coordinates
-
getRawVectorAsync
Retrieves the raw vector associated with an element asynchronously- Parameters:
element
- element name- Returns:
- list of raw vector values
-
getAttributesAsync
Retrieves attributes of a vector set element asynchronously- Parameters:
element
- element nameclazz
- class type for deserialization- Returns:
- deserialized attributes object
-
getInfoAsync
RFuture<VectorInfo> getInfoAsync()Returns metadata and internal details about the vector set asynchronously- Returns:
- vector set information
-
getNeighborsAsync
Retrieves the neighbors of a specified element asynchronously- Parameters:
element
- element name- Returns:
- list of neighbor element names
-
getNeighborEntriesAsync
Retrieves the neighbors of a specified element with scores asynchronously- Parameters:
element
- element name- Returns:
- list of neighbor elements with scores
-
randomAsync
Returns a random element from the vector set asynchronously- Returns:
- random element name
-
randomAsync
Returns multiple random elements from the vector set asynchronously- Parameters:
count
- number of elements to return- Returns:
- list of random element names
-
removeAsync
Removes an element from the vector set asynchronously- Parameters:
element
- element name to remove- Returns:
- true if element was removed, false otherwise
-
setAttributesAsync
Sets attributes for a vector set element asynchronously- Parameters:
element
- element nameattributes
- attributes object to serialize- Returns:
- true if attributes were set, false otherwise
-
getSimilarAsync
Retrieves elements similar to a given vector or element asynchronously- Parameters:
args
- vector similarity arguments- Returns:
- list of similar element names
-
getSimilarEntriesAsync
Retrieves elements similar to a given vector or element with scores asynchronously- Parameters:
args
- vector similarity arguments- Returns:
- list of similar elements with scores
-