Package org.redisson.api
Interface RVectorSetAsync
- All Superinterfaces:
RExpirableAsync,RObjectAsync
- All Known Subinterfaces:
RVectorSet
- All Known Implementing Classes:
RedissonVectorSet
Async interface for Vector Set
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionaddAsync(VectorAddArgs args) Adds an elementReturns the number of dimensions of vectors<T> RFuture<T> getAttributesAsync(String name, Class<T> clazz) Retrieves attributes associated with a given element nameReturns metadata for this vector setgetNeighborEntriesAsync(String element) Retrieves the neighbors with scores of a specified element by namegetNeighborsAsync(String element) Retrieves the neighbors of a specified element by namegetRawVectorAsync(String name) Retrieves raw internal representation of the approximate vector associated with a given element nameRetrieves element names similar to a specified vector or elementRetrieves element names with scores similar to a given vector or elementRetrieves element names with scores and attributes similar to a given vector or elementgetVectorAsync(String name) Retrieves approximate vector associated with a given element nameReturns a random element namerandomAsync(int count) Returns random element namesremoveAsync(String element) Removes an element by namesetAttributesAsync(String element, Object attributes) Sets attributes for an element by nameReturns the number of elementsMethods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsyncMethods 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- Parameters:
args- add arguments- Returns:
trueif element was added andfalseif updated
-
sizeAsync
Returns the number of elements- Returns:
- number of elements
-
dimensionsAsync
Returns the number of dimensions of vectors- Returns:
- dimensions count
-
getVectorAsync
Retrieves approximate vector associated with a given element name- Parameters:
name- element name- Returns:
- list of vector coordinates
-
getRawVectorAsync
Retrieves raw internal representation of the approximate vector associated with a given element name- Parameters:
name- element name- Returns:
- list of raw vector values
-
getAttributesAsync
Retrieves attributes associated with a given element name- Parameters:
name- element nameclazz- type for deserialization- Returns:
- attributes
-
getInfoAsync
RFuture<VectorInfo> getInfoAsync()Returns metadata for this vector set- Returns:
- vector set information
-
getNeighborsAsync
Retrieves the neighbors of a specified element by name- Parameters:
element- element name- Returns:
- list of neighbor element names
-
getNeighborEntriesAsync
Retrieves the neighbors with scores of a specified element by name- Parameters:
element- element name- Returns:
- list of neighbor elements with scores
-
randomAsync
Returns a random element name- Returns:
- random element name
-
randomAsync
Returns random element names- Parameters:
count- number of elements to return- Returns:
- list of random element names
-
removeAsync
Removes an element by name- Parameters:
element- element name to remove- Returns:
trueif element was removed,falseotherwise
-
setAttributesAsync
Sets attributes for an element by name- Parameters:
element- element nameattributes- attributes- Returns:
trueif attributes were set,falseotherwise
-
getSimilarAsync
Retrieves element names similar to a specified vector or element- Parameters:
args- vector similarity arguments- Returns:
- list of similar element names
-
getSimilarEntriesAsync
Retrieves element names with scores similar to a given vector or element- Parameters:
args- similarity arguments- Returns:
- list of similar element names with scores
-
getSimilarEntriesWithAttributesAsync
RFuture<List<ScoreAttributesEntry<String>>> getSimilarEntriesWithAttributesAsync(VectorSimilarArgs args) Retrieves element names with scores and attributes similar to a given vector or element- Parameters:
args- similarity arguments- Returns:
- list of similar element names with scores and attributes
-