Class ReactiveAerospikeTemplate
- All Implemented Interfaces:
ReactiveAerospikeOperations
,IndexesCacheRefresher
ReactiveAerospikeOperations
.- Author:
- Igor Ermolenko, Volodymyr Shpynta, Yevhen Tsyba
-
Constructor Summary
ConstructorDescriptionReactiveAerospikeTemplate
(com.aerospike.client.reactor.IAerospikeReactorClient reactorClient, String namespace, MappingAerospikeConverter converter, AerospikeMappingContext mappingContext, AerospikeExceptionTranslator exceptionTranslator, ReactorQueryEngine queryEngine, ReactorIndexRefresher reactorIndexRefresher, ServerVersionSupport serverVersionSupport) -
Method Summary
Modifier and TypeMethodDescription<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's class and id, add specified value to the record's bin and return the modified record mapped to the document's class.<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's id and the given set name, add specified value to the record's bin and return the modified record mapped to the document's class.<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's id and the given set name, add map values to the corresponding bins of the record and return the modified record mapped to the document's class.<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's class and id, add map values to the corresponding bins of the record and return the modified record mapped to the document's class.<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's class and id, append specified value to the record's bin and return the modified record mapped to the document's class.<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's id and the given set name, append specified value to the record's bin and return the modified record mapped to the document's class.<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's id and the given set name, append map values to the corresponding bins of the record and return the modified record mapped to the document's class.<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's class and id, append map values to the corresponding bins of the record and return the modified record mapped to the document's class.<T> reactor.core.publisher.Mono
<Long> Reactively return the amount of records in the set determined by the given entityClass.reactor.core.publisher.Mono
<Long> Reactively return the amount of records in the given Aerospike set.<T> reactor.core.publisher.Mono
<Long> Reactively return the amount of records in query results.reactor.core.publisher.Mono
<Long> Reactively return the amount of records in query results within the given set.<T> reactor.core.publisher.Mono
<Void> createIndex
(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType) Reactively create an index with the specified name in Aerospike.<T> reactor.core.publisher.Mono
<Void> createIndex
(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType, com.aerospike.client.query.IndexCollectionType indexCollectionType) Reactively create an index with the specified name in Aerospike.<T> reactor.core.publisher.Mono
<Void> createIndex
(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType, com.aerospike.client.query.IndexCollectionType indexCollectionType, com.aerospike.client.cdt.CTX... ctx) Reactively create an index with the specified name in Aerospike.reactor.core.publisher.Mono
<Void> createIndex
(String setName, String indexName, String binName, com.aerospike.client.query.IndexType indexType) Reactively create an index with the specified name in Aerospike.reactor.core.publisher.Mono
<Void> createIndex
(String setName, String indexName, String binName, com.aerospike.client.query.IndexType indexType, com.aerospike.client.query.IndexCollectionType indexCollectionType) Reactively create an index with the specified name in Aerospike.reactor.core.publisher.Mono
<Void> createIndex
(String setName, String indexName, String binName, com.aerospike.client.query.IndexType indexType, com.aerospike.client.query.IndexCollectionType indexCollectionType, com.aerospike.client.cdt.CTX... ctx) Reactively create an index with the specified name in Aerospike.<T> reactor.core.publisher.Mono
<Void> Deprecated, for removal: This API element is subject to removal in a future version.<T> reactor.core.publisher.Mono
<Boolean> Deprecated, for removal: This API element is subject to removal in a future version.<T> reactor.core.publisher.Mono
<Boolean> delete
(T document) Reactively delete a record using the document's id.<T> reactor.core.publisher.Mono
<Boolean> Reactively delete a record within the given set using the document's id.<T> reactor.core.publisher.Mono
<Void> Reactively truncate/delete all records in the set determined by the given entity class.<T> reactor.core.publisher.Mono
<Void> Reactively truncate/delete all records in the set determined by the given entity class.<T> reactor.core.publisher.Mono
<Void> Reactively delete multiple records in one batch request.<T> reactor.core.publisher.Mono
<Void> Reactively delete multiple records within the given set (overrides the default set associated with the documents) in one batch request.reactor.core.publisher.Mono
<Void> Reactively truncate/delete all the documents in the given set.reactor.core.publisher.Mono
<Void> Reactively truncate/delete all documents in the given set.<T> reactor.core.publisher.Mono
<Boolean> deleteById
(Object id, Class<T> entityClass) Reactively delete a record by id, set name will be determined by the given entity class.reactor.core.publisher.Mono
<Boolean> deleteById
(Object id, String setName) Reactively delete a record by id within the given set.<T> reactor.core.publisher.Mono
<Void> deleteByIds
(Iterable<?> ids, Class<T> entityClass) Reactively delete records using a single batch delete operation, set name will be determined by the given entity class.reactor.core.publisher.Mono
<Void> deleteByIds
(Iterable<?> ids, String setName) Reactively delete records within the given set using a single batch delete operation.reactor.core.publisher.Mono
<Void> deleteByIds
(GroupedKeys groupedKeys) Reactively delete records from different sets in a single request.<T> reactor.core.publisher.Mono
<Void> deleteIndex
(Class<T> entityClass, String indexName) Reactively delete an index with the specified name in Aerospike.reactor.core.publisher.Mono
<Void> deleteIndex
(String setName, String indexName) Reactively delete an index with the specified name within the given set in Aerospike.<T> reactor.core.publisher.Mono
<T> Reactively execute operation against underlying store.<T> reactor.core.publisher.Mono
<Boolean> Reactively check by id if a record exists within the set associated with the given entityClass.reactor.core.publisher.Mono
<Boolean> Reactively check by id if a record exists within the given set name.<T> reactor.core.publisher.Mono
<Boolean> existsByQuery
(Query query, Class<T> entityClass) Reactively check using a query if any matching records exist within the set determined by the given entityClass.<T> reactor.core.publisher.Mono
<Boolean> existsByQuery
(Query query, Class<T> entityClass, String setName) Reactively check using a query if any matching records exist within the given set.<T> reactor.core.publisher.Flux
<T> Reactively find records in the given entityClass's set using a query and map them to the given class type.<T,
S> reactor.core.publisher.Flux <S> Reactively find records in the given entityClass's set using a query and map them to the given target class type.<T> reactor.core.publisher.Flux
<T> Reactively find records in the given set using a query and map them to the given target class type.<T> reactor.core.publisher.Flux
<T> Reactively find all records in the given entityClass's set and map them to the given class type.<T,
S> reactor.core.publisher.Flux <S> Reactively find all records in the given entityClass's set and map them to the given target class type.<T> reactor.core.publisher.Flux
<T> Reactively find all records in the given set and map them to the given class type.<T> reactor.core.publisher.Flux
<T> Reactively find all records in the given entityClass's set using a provided sort and map them to the given class type.<T,
S> reactor.core.publisher.Flux <S> Reactively find all records in the given entityClass's set using a provided sort and map them to the given target class type.<T> reactor.core.publisher.Flux
<T> Reactively find all records in the given entityClass's set using a provided sort and map them to the given target class type.<T> reactor.core.publisher.Mono
<T> Reactively find a record by id, set name will be determined by the given entityClass.<T,
S> reactor.core.publisher.Mono <S> Reactively find a record by id, set name will be determined by the given entityClass.<T,
S> reactor.core.publisher.Mono <S> Reactively find a record by id within the given set.<T> reactor.core.publisher.Mono
<T> Reactively find a record by id within the given set.<T> reactor.core.publisher.Flux
<T> Reactively find records by ids using a single batch read operation, set name will be determined by the given entityClass.<T,
S> reactor.core.publisher.Flux <S> Reactively find records by ids using a single batch read operation, set name will be determined by the given entityClass.<T> reactor.core.publisher.Flux
<T> Reactively find records by ids within the given set using a single batch read operation.reactor.core.publisher.Mono
<GroupedEntities> findByIds
(GroupedKeys groupedKeys) Reactively execute a single batch request to find several records, possibly from different sets.<T,
S> reactor.core.publisher.Flux <?> findByIdsUsingQuery
(Collection<?> ids, Class<T> entityClass, Class<S> targetClass, String setName, Query query) Find records by ids within the given set name.<T,
S> reactor.core.publisher.Flux <?> findByIdsUsingQuery
(Collection<?> ids, Class<T> entityClass, Class<S> targetClass, Query query) Find records by ids, set name will be determined by the given entityClass.<T,
S> reactor.core.publisher.Mono <?> findByIdUsingQuery
(Object id, Class<T> entityClass, Class<S> targetClass, String setName, Query query) Find a record by id within the given set using a query.<T,
S> reactor.core.publisher.Mono <?> findByIdUsingQuery
(Object id, Class<T> entityClass, Class<S> targetClass, Query query) Find a record by id using a query, set name will be determined by the given entityClass.<T> reactor.core.publisher.Flux
<T> findInRange
(long offset, long limit, Sort sort, Class<T> entityClass) Reactively find records in the given entityClass's set using a range (offset, limit) and a sort and map them to the given class type.<T,
S> reactor.core.publisher.Flux <S> findInRange
(long offset, long limit, Sort sort, Class<T> entityClass, Class<S> targetClass) Reactively find records in the given entityClass's set using a range (offset, limit) and a sort and map them to the given target class type.<T> reactor.core.publisher.Flux
<T> findInRange
(long offset, long limit, Sort sort, Class<T> targetClass, String setName) Reactively find records in the given set using a range (offset, limit) and a sort and map them to the given class type.<T,
S> reactor.core.publisher.Flux <S> findUsingQueryWithoutPostProcessing
(Class<T> entityClass, Class<S> targetClass, Query query) Reactively find records in the given entityClass's set using a query and map them to the given target class type.com.aerospike.client.reactor.IAerospikeReactorClient
<T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData
<T> getBatchWriteForDelete
(T document, String setName) <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData
<T> getBatchWriteForInsert
(T document, String setName) <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData
<T> getBatchWriteForSave
(T document, String setName) <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData
<T> getBatchWriteForUpdate
(T document, String setName) MappingContext
<?, ?> long
<T> String
getSetName
(Class<T> entityClass) <T> String
getSetName
(T document) reactor.core.publisher.Mono
<Boolean> indexExists
(String indexName) Check whether an index with the specified name exists in Aerospike.<T> reactor.core.publisher.Mono
<T> insert
(T document) Reactively insert a document usingRecordExistsAction.CREATE_ONLY
policy.<T> reactor.core.publisher.Mono
<T> Reactively insert a document within the given set usingRecordExistsAction.CREATE_ONLY
policy.<T> reactor.core.publisher.Flux
<T> Reactively insert documents using one batch request.<T> reactor.core.publisher.Flux
<T> Reactively insert documents within the given set using one batch request.<T> reactor.core.publisher.Mono
<T> persist
(T document, com.aerospike.client.policy.WritePolicy policy) Reactively persist a document using specified WritePolicy.<T> reactor.core.publisher.Mono
<T> Reactively persist a document within the given set (overrides the default set associated with the document) using specified WritePolicy.<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's class and id, prepend specified value to the record's bin and return the modified record mapped to the document's class.<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's id and the given set name, prepend specified value to the record's bin and return the modified record mapped to the document's class.<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's id and the given set name, prepend map values to the corresponding bins of the record and return the modified record mapped to the document's class.<T> reactor.core.publisher.Mono
<T> Find an existing record matching the document's class and id, prepend map values to the corresponding bins of the record and return the modified record mapped to the document's class.void
<T> reactor.core.publisher.Mono
<T> save
(T document) Reactively save a document.<T> reactor.core.publisher.Mono
<T> Reactively save a document within the given set.<T> reactor.core.publisher.Flux
<T> Reactively save documents using one batch request.<T> reactor.core.publisher.Flux
<T> Reactively save documents within the given set using one batch request.<T> reactor.core.publisher.Mono
<T> update
(T document) Reactively update a record usingRecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document if it is present.<T> reactor.core.publisher.Mono
<T> Reactively update a record within the given set usingRecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document if it is present.<T> reactor.core.publisher.Mono
<T> update
(T document, String setName, Collection<String> fields) Reactively update specific fields of a record based on the given collection of fields within the given set usingRecordExistsAction.UPDATE_ONLY
policy.<T> reactor.core.publisher.Mono
<T> update
(T document, Collection<String> fields) Reactively update specific bins of a record based on the given collection of fields usingRecordExistsAction.UPDATE_ONLY
policy.<T> reactor.core.publisher.Flux
<T> Reactively update records using one batch request.<T> reactor.core.publisher.Flux
<T> Reactively update records within the given set using one batch request.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.aerospike.core.ReactiveAerospikeOperations
getAerospikeConverter, getMappingContext
-
Constructor Details
-
ReactiveAerospikeTemplate
public ReactiveAerospikeTemplate(com.aerospike.client.reactor.IAerospikeReactorClient reactorClient, String namespace, MappingAerospikeConverter converter, AerospikeMappingContext mappingContext, AerospikeExceptionTranslator exceptionTranslator, ReactorQueryEngine queryEngine, ReactorIndexRefresher reactorIndexRefresher, ServerVersionSupport serverVersionSupport)
-
-
Method Details
-
refreshIndexesCache
public void refreshIndexesCache()- Specified by:
refreshIndexesCache
in interfaceIndexesCacheRefresher
-
save
public <T> reactor.core.publisher.Mono<T> save(T document) Description copied from interface:ReactiveAerospikeOperations
Reactively save a document.If the document has version property, CAS algorithm is used for updating record. Version property is used for deciding whether to create new record or update existing. If the version is set to zero, a new record will be created, creation will fail if such record already exists. If version is greater than zero, existing record will be updated with
RecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document. Version property will be updated with the server's version after successful operation.If the document does not have version property, the record is updated with
RecordExistsAction.UPDATE
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE
). This means that when such record does not exist it will be created, otherwise updated (an "upsert").- Specified by:
save
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to be saved. Must not be null.- Returns:
- A Mono of the new saved document.
-
save
Description copied from interface:ReactiveAerospikeOperations
Reactively save a document within the given set.If the document has version property, CAS algorithm is used for updating record. Version property is used for deciding whether to create new record or update existing. If the version is set to zero, a new record will be created, creation will fail if such record already exists. If version is greater than zero, existing record will be updated with
RecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document. Version property will be updated with the server's version after successful operation.If the document does not have version property, the record is updated with
RecordExistsAction.UPDATE
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE
). This means that when such record does not exist it will be created, otherwise updated (an "upsert").- Specified by:
save
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to be saved. Must not be null.setName
- The set name to save the document.- Returns:
- A Mono of the new saved document.
-
saveAll
Description copied from interface:ReactiveAerospikeOperations
Reactively save documents using one batch request. The policies are analogous toReactiveAerospikeOperations.save(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
Requires Server version 6.0+.
- Specified by:
saveAll
in interfaceReactiveAerospikeOperations
- Parameters:
documents
- The documents to be saved. Must not be null.- Returns:
- A Flux of the saved documents
-
saveAll
Description copied from interface:ReactiveAerospikeOperations
Reactively save documents within the given set using one batch request. The policies are analogous toReactiveAerospikeOperations.save(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
Requires Server version 6.0+.
- Specified by:
saveAll
in interfaceReactiveAerospikeOperations
- Parameters:
documents
- The documents to be saved. Must not be null.setName
- The set name to save to documents.- Returns:
- A Flux of the saved documents
-
insert
public <T> reactor.core.publisher.Mono<T> insert(T document) Description copied from interface:ReactiveAerospikeOperations
Reactively insert a document usingRecordExistsAction.CREATE_ONLY
policy.If the document has version property it will be updated with the server's version after successful operation.
- Specified by:
insert
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to be inserted. Must not be null.- Returns:
- A Mono of the new inserted document.
-
insert
Description copied from interface:ReactiveAerospikeOperations
Reactively insert a document within the given set usingRecordExistsAction.CREATE_ONLY
policy.If the document has version property it will be updated with the server's version after successful operation.
- Specified by:
insert
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to be inserted. Must not be null.setName
- The set name to insert the document.- Returns:
- A Mono of the new inserted document.
-
insertAll
Description copied from interface:ReactiveAerospikeOperations
Reactively insert documents using one batch request. The policies are analogous toReactiveAerospikeOperations.insert(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
Requires Server version 6.0+.
- Specified by:
insertAll
in interfaceReactiveAerospikeOperations
- Parameters:
documents
- Documents to insert. Must not be null.- Returns:
- A Flux of the inserted documents
-
insertAll
public <T> reactor.core.publisher.Flux<T> insertAll(Iterable<? extends T> documents, String setName) Description copied from interface:ReactiveAerospikeOperations
Reactively insert documents within the given set using one batch request. The policies are analogous toReactiveAerospikeOperations.insert(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
Requires Server version 6.0+.
- Specified by:
insertAll
in interfaceReactiveAerospikeOperations
- Parameters:
documents
- Documents to insert. Must not be null.setName
- The set name to insert the documents.- Returns:
- A Flux of the inserted documents
-
persist
public <T> reactor.core.publisher.Mono<T> persist(T document, com.aerospike.client.policy.WritePolicy policy) Description copied from interface:ReactiveAerospikeOperations
Reactively persist a document using specified WritePolicy.- Specified by:
persist
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to be persisted. Must not be null.policy
- The Aerospike write policy for the inner Aerospike put operation. Must not be null.- Returns:
- A Mono of the new persisted document.
-
persist
public <T> reactor.core.publisher.Mono<T> persist(T document, com.aerospike.client.policy.WritePolicy policy, String setName) Description copied from interface:ReactiveAerospikeOperations
Reactively persist a document within the given set (overrides the default set associated with the document) using specified WritePolicy.- Specified by:
persist
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to be persisted. Must not be null.policy
- The Aerospike write policy for the inner Aerospike put operation. Must not be null.setName
- Set name to override the set associated with the document.- Returns:
- A Mono of the new persisted document.
-
update
public <T> reactor.core.publisher.Mono<T> update(T document) Description copied from interface:ReactiveAerospikeOperations
Reactively update a record usingRecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document if it is present.If the document has version property it will be updated with the server's version after successful operation.
- Specified by:
update
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document that identifies the record to be updated. Must not be null.- Returns:
- A Mono of the new updated document.
-
update
Description copied from interface:ReactiveAerospikeOperations
Reactively update a record within the given set usingRecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document if it is present.If document has version property it will be updated with the server's version after successful operation.
- Specified by:
update
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document that identifies the record to be updated. Must not be null.setName
- The set name to update the document.- Returns:
- A Mono of the new updated document.
-
update
Description copied from interface:ReactiveAerospikeOperations
Reactively update specific bins of a record based on the given collection of fields usingRecordExistsAction.UPDATE_ONLY
policy. You can instantiate the document with only relevant fields and specify the list of fields that you want to update, taking into consideration the version property of the document if it is present.If document has version property it will be updated with the server's version after successful operation.
- Specified by:
update
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document that identifies the record to be updated. Must not be null.- Returns:
- A Mono of the new updated document.
-
update
public <T> reactor.core.publisher.Mono<T> update(T document, String setName, Collection<String> fields) Description copied from interface:ReactiveAerospikeOperations
Reactively update specific fields of a record based on the given collection of fields within the given set usingRecordExistsAction.UPDATE_ONLY
policy. You can instantiate the document with only relevant fields and specify the list of fields that you want to update, taking into consideration the version property of the document if it is present.If document has version property it will be updated with the server's version after successful operation.
- Specified by:
update
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document that identifies the record to be updated. Must not be null.setName
- The set name to update the document.- Returns:
- A Mono of the new updated document.
-
updateAll
Description copied from interface:ReactiveAerospikeOperations
Reactively update records using one batch request. The policies are analogous toReactiveAerospikeOperations.update(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
Requires Server version 6.0+.
- Specified by:
updateAll
in interfaceReactiveAerospikeOperations
- Parameters:
documents
- The documents that identify the records to be updated. Must not be null.- Returns:
- A Flux of the updated documents
-
updateAll
public <T> reactor.core.publisher.Flux<T> updateAll(Iterable<? extends T> documents, String setName) Description copied from interface:ReactiveAerospikeOperations
Reactively update records within the given set using one batch request. The policies are analogous toReactiveAerospikeOperations.update(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
Requires Server version 6.0+.
- Specified by:
updateAll
in interfaceReactiveAerospikeOperations
- Parameters:
documents
- The documents that identify the records to be updated. Must not be null.setName
- The set name to update the documents.- Returns:
- A Flux of the updated documents
-
delete
@Deprecated(since="4.6.0", forRemoval=true) public <T> reactor.core.publisher.Mono<Void> delete(Class<T> entityClass) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ReactiveAerospikeOperations
Reactively truncate/delete all records from the set determined by the given entityClass.- Specified by:
delete
in interfaceReactiveAerospikeOperations
- Parameters:
entityClass
- The class to extract the Aerospike set name from. Must not be null.
-
delete
@Deprecated(since="4.6.0", forRemoval=true) public <T> reactor.core.publisher.Mono<Boolean> delete(Object id, Class<T> entityClass) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ReactiveAerospikeOperations
Reactively delete a record by id, set name will be determined by the given entity class.- Specified by:
delete
in interfaceReactiveAerospikeOperations
- Parameters:
id
- The id of a record to be deleted. Must not be null.entityClass
- The class to extract the Aerospike set name from. Must not be null.- Returns:
- A Mono of whether the document existed on server before deletion.
-
delete
Description copied from interface:ReactiveAerospikeOperations
Reactively delete a record using the document's id.If the document has version property it will be compared with the corresponding record's version on server.
- Specified by:
delete
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get set name and id from. Must not be null.- Returns:
- A Mono of whether the record existed on server before deletion.
-
delete
Description copied from interface:ReactiveAerospikeOperations
Reactively delete a record within the given set using the document's id.- Specified by:
delete
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get id from. Must not be null.setName
- Set name to use.- Returns:
- A Mono of whether the record existed on server before deletion.
-
deleteById
Description copied from interface:ReactiveAerospikeOperations
Reactively delete a record by id, set name will be determined by the given entity class.If the document has version property it is not compared with the corresponding record's version on server.
- Specified by:
deleteById
in interfaceReactiveAerospikeOperations
- Parameters:
id
- The id of the record to be deleted. Must not be null.entityClass
- The class to extract the Aerospike set name from. Must not be null.- Returns:
- A Mono of whether the record existed on server before deletion.
-
deleteById
Description copied from interface:ReactiveAerospikeOperations
Reactively delete a record by id within the given set.If the document has version property it is not compared with the corresponding record's version on server.
- Specified by:
deleteById
in interfaceReactiveAerospikeOperations
- Parameters:
id
- The id of the record to be deleted. Must not be null.setName
- Set name to use.- Returns:
- A Mono of whether the record existed on server before deletion.
-
deleteAll
Description copied from interface:ReactiveAerospikeOperations
Reactively delete multiple records in one batch request. The policies are analogous toReactiveAerospikeOperations.delete(Object)
.The execution order is NOT preserved.
This operation requires Server version 6.0+.
- Specified by:
deleteAll
in interfaceReactiveAerospikeOperations
- Parameters:
documents
- The documents to be deleted. Must not be null.
-
deleteAll
Description copied from interface:ReactiveAerospikeOperations
Reactively delete multiple records within the given set (overrides the default set associated with the documents) in one batch request. The policies are analogous toReactiveAerospikeOperations.delete(Object)
.The execution order is NOT preserved.
This operation requires Server version 6.0+.
- Specified by:
deleteAll
in interfaceReactiveAerospikeOperations
- Parameters:
documents
- The documents to be deleted. Must not be null.setName
- Set name to override the default set associated with the documents.
-
deleteByIds
Description copied from interface:ReactiveAerospikeOperations
Reactively delete records using a single batch delete operation, set name will be determined by the given entity class. The policies are analogous toReactiveAerospikeOperations.deleteById(Object, Class)
.This operation requires Server version 6.0+.
- Specified by:
deleteByIds
in interfaceReactiveAerospikeOperations
- Parameters:
ids
- The ids of the records to find. Must not be null.entityClass
- The class to extract the Aerospike set name from and to map the results to. Must not be null.
-
deleteByIds
Description copied from interface:ReactiveAerospikeOperations
Reactively delete records within the given set using a single batch delete operation. The policies are analogous toReactiveAerospikeOperations.deleteById(Object, String)
.This operation requires Server version 6.0+.
- Specified by:
deleteByIds
in interfaceReactiveAerospikeOperations
- Parameters:
ids
- The ids of the documents to find. Must not be null.setName
- Set name to use.
-
deleteByIds
Description copied from interface:ReactiveAerospikeOperations
Reactively delete records from different sets in a single request.Records' versions on server are not checked.
This operation requires Server version 6.0+.
- Specified by:
deleteByIds
in interfaceReactiveAerospikeOperations
- Parameters:
groupedKeys
- Keys grouped by document type. Must not be null, groupedKeys.getEntitiesKeys() must not be null.
-
deleteAll
Description copied from interface:ReactiveAerospikeOperations
Reactively truncate/delete all records in the set determined by the given entity class.- Specified by:
deleteAll
in interfaceReactiveAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.
-
deleteAll
public <T> reactor.core.publisher.Mono<Void> deleteAll(Class<T> entityClass, Instant beforeLastUpdate) Description copied from interface:ReactiveAerospikeOperations
Reactively truncate/delete all records in the set determined by the given entity class.- Specified by:
deleteAll
in interfaceReactiveAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.beforeLastUpdate
- Delete records before the specified time (must be earlier than the current time at millisecond resolution).
-
deleteAll
Description copied from interface:ReactiveAerospikeOperations
Reactively truncate/delete all the documents in the given set.- Specified by:
deleteAll
in interfaceReactiveAerospikeOperations
- Parameters:
setName
- Set name to use.
-
deleteAll
Description copied from interface:ReactiveAerospikeOperations
Reactively truncate/delete all documents in the given set.- Specified by:
deleteAll
in interfaceReactiveAerospikeOperations
- Parameters:
setName
- Set name to truncate/delete all records in.beforeLastUpdate
- Delete records before the specified time (must be earlier than the current time at millisecond resolution).
-
add
Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's class and id, add map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
add
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the result to. Must not be null.values
- The Map of bin names and values to add. Must not be null.- Returns:
- A Mono of the modified record mapped to the document's class.
-
add
Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's id and the given set name, add map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
add
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get id from and to map the result to. Must not be null.setName
- Set name to use.values
- The Map of bin names and values to add. Must not be null.- Returns:
- A Mono of the modified record mapped to the document's class.
-
add
Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's class and id, add specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
add
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the result to. Must not be null.binName
- Bin name to use add operation on. Must not be null.value
- The value to add.- Returns:
- A Mono of the modified record mapped to the document's class.
-
add
public <T> reactor.core.publisher.Mono<T> add(T document, String setName, String binName, long value) Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's id and the given set name, add specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
add
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get id from and to map the result to. Must not be null.setName
- Set name to use.binName
- Bin name to use add operation on. Must not be null.value
- The value to add.- Returns:
- A Mono of the modified record mapped to the document's class.
-
append
Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's class and id, append map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
append
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the result to. Must not be null.values
- The Map of bin names and values to append. Must not be null.- Returns:
- A Mono of the modified record mapped to the document's class.
-
append
public <T> reactor.core.publisher.Mono<T> append(T document, String setName, Map<String, String> values) Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's id and the given set name, append map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
append
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get id from and to map the result to. Must not be null.setName
- Set name to use.values
- The Map of bin names and values to append. Must not be null.- Returns:
- A Mono of the modified record mapped to the document's class.
-
append
Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's class and id, append specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
append
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the result to. Must not be null.binName
- Bin name to use append operation on.value
- The value to append.- Returns:
- A Mono of the modified record mapped to the document's class.
-
append
public <T> reactor.core.publisher.Mono<T> append(T document, String setName, String binName, String value) Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's id and the given set name, append specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
append
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get id from and to map the result to. Must not be null.setName
- Set name to use.binName
- Bin name to use append operation on.value
- The value to append.- Returns:
- A Mono of the modified record mapped to the document's class.
-
prepend
Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's class and id, prepend map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
prepend
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the result to. Must not be null.values
- The Map of bin names and values to prepend. Must not be null.- Returns:
- A Mono of the modified record mapped to the document's class.
-
prepend
public <T> reactor.core.publisher.Mono<T> prepend(T document, String setName, Map<String, String> values) Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's id and the given set name, prepend map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
prepend
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get id from and to map the result to. Must not be null.setName
- Set name to use.values
- The Map of bin names and values to prepend. Must not be null.- Returns:
- A Mono of the modified record mapped to the document's class.
-
prepend
Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's class and id, prepend specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
prepend
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the result to. Must not be null.binName
- Bin name to use prepend operation on.value
- The value to prepend.- Returns:
- A Mono of the modified record mapped to the document's class.
-
prepend
public <T> reactor.core.publisher.Mono<T> prepend(T document, String setName, String binName, String value) Description copied from interface:ReactiveAerospikeOperations
Find an existing record matching the document's id and the given set name, prepend specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
prepend
in interfaceReactiveAerospikeOperations
- Parameters:
document
- The document to get id from and to map the result to. Must not be null.setName
- Set name to use.binName
- Bin name to use prepend operation on.value
- The value to prepend.- Returns:
- A Mono of the modified record mapped to the document's class.
-
execute
Description copied from interface:ReactiveAerospikeOperations
Reactively execute operation against underlying store.- Specified by:
execute
in interfaceReactiveAerospikeOperations
- Parameters:
supplier
- must not be null.- Returns:
- A Mono of the execution result.
-
findById
Description copied from interface:ReactiveAerospikeOperations
Reactively find a record by id, set name will be determined by the given entityClass.The matching record will be mapped to the given entityClass.
- Specified by:
findById
in interfaceReactiveAerospikeOperations
- Parameters:
id
- The id of the record to find. Must not be null.entityClass
- The class to extract set name from and to map the document to. Must not be null.- Returns:
- A Mono of the matching record mapped to entityClass type.
-
findById
Description copied from interface:ReactiveAerospikeOperations
Reactively find a record by id within the given set.The matching record will be mapped to the given entityClass.
- Specified by:
findById
in interfaceReactiveAerospikeOperations
- Parameters:
id
- The id of the record to find. Must not be null.entityClass
- The class to map the record to and to get entity properties from (such expiration). Must not be null.setName
- Set name to use.- Returns:
- A Mono of the matching record mapped to entityClass type.
-
findById
public <T,S> reactor.core.publisher.Mono<S> findById(Object id, Class<T> entityClass, Class<S> targetClass) Description copied from interface:ReactiveAerospikeOperations
Reactively find a record by id, set name will be determined by the given entityClass.The matching record will be mapped to the given targetClass.
- Specified by:
findById
in interfaceReactiveAerospikeOperations
- Parameters:
id
- The id of the record to find. Must not be null.entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the record to. Must not be null.- Returns:
- A Mono of the matching record mapped to targetClass type.
-
findById
public <T,S> reactor.core.publisher.Mono<S> findById(Object id, Class<T> entityClass, Class<S> targetClass, String setName) Description copied from interface:ReactiveAerospikeOperations
Reactively find a record by id within the given set.The matching record will be mapped to the given targetClass.
- Specified by:
findById
in interfaceReactiveAerospikeOperations
- Parameters:
id
- The id of the record to find. Must not be null.entityClass
- The class to map the record to and to get entity properties from (such expiration). Must not be null.targetClass
- The class to map the record to. Must not be null.setName
- Set name to use.- Returns:
- A Mono of the matching record mapped to targetClass type.
-
findByIds
Description copied from interface:ReactiveAerospikeOperations
Reactively find records by ids using a single batch read operation, set name will be determined by the given entityClass.The records will be mapped to the given entityClass.
- Specified by:
findByIds
in interfaceReactiveAerospikeOperations
- Parameters:
ids
- The ids of the documents to find. Must not be null.entityClass
- The class to extract set name from and to map the documents to. Must not be null.- Returns:
- A Flux of matching records mapped to entityClass type.
-
findByIds
public <T,S> reactor.core.publisher.Flux<S> findByIds(Iterable<?> ids, Class<T> entityClass, Class<S> targetClass) Description copied from interface:ReactiveAerospikeOperations
Reactively find records by ids using a single batch read operation, set name will be determined by the given entityClass.The records will be mapped to the given targetClass.
- Specified by:
findByIds
in interfaceReactiveAerospikeOperations
- Parameters:
ids
- The ids of the documents to find. Must not be null.entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the documents to. Must not be null.- Returns:
- A Flux of matching records mapped to targetClass type.
-
findByIds
public <T> reactor.core.publisher.Flux<T> findByIds(Iterable<?> ids, Class<T> targetClass, String setName) Description copied from interface:ReactiveAerospikeOperations
Reactively find records by ids within the given set using a single batch read operation.The records will be mapped to the given entityClass.
- Specified by:
findByIds
in interfaceReactiveAerospikeOperations
- Parameters:
ids
- The ids of the documents to find. Must not be null.targetClass
- The class to map the documents to. Must not be null.setName
- Set name to use.- Returns:
- A Flux of matching records mapped to entityClass type.
-
findByIds
Description copied from interface:ReactiveAerospikeOperations
Reactively execute a single batch request to find several records, possibly from different sets.Aerospike provides functionality to get records from different sets in 1 batch request. This method receives keys grouped by document type as a parameter and returns Aerospike records mapped to documents grouped by type.
- Specified by:
findByIds
in interfaceReactiveAerospikeOperations
- Parameters:
groupedKeys
- Keys grouped by document type. Must not be null, groupedKeys.getEntitiesKeys() must not be null.- Returns:
- Mono of grouped documents.
-
findByIdUsingQuery
public <T,S> reactor.core.publisher.Mono<?> findByIdUsingQuery(Object id, Class<T> entityClass, Class<S> targetClass, Query query) Description copied from interface:ReactiveAerospikeOperations
Find a record by id using a query, set name will be determined by the given entityClass.The records will be mapped to the given targetClass.
- Specified by:
findByIdUsingQuery
in interfaceReactiveAerospikeOperations
- Parameters:
id
- The id of the record to find. Must not be null.entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the record to.query
- TheQuery
to filter results. Optional argument (null if no filtering required).- Returns:
- The matching record mapped to targetClass's type.
-
findByIdUsingQuery
public <T,S> reactor.core.publisher.Mono<?> findByIdUsingQuery(Object id, Class<T> entityClass, Class<S> targetClass, String setName, Query query) Description copied from interface:ReactiveAerospikeOperations
Find a record by id within the given set using a query.The records will be mapped to the given targetClass.
- Specified by:
findByIdUsingQuery
in interfaceReactiveAerospikeOperations
- Parameters:
id
- The id of the record to find. Must not be null.entityClass
- The class to get the entity properties from (such as expiration). Must not be null.targetClass
- The class to map the record to.setName
- Set name to use.query
- TheQuery
to filter results. Optional argument (null if no filtering required).- Returns:
- The matching record mapped to targetClass's type.
-
findByIdsUsingQuery
public <T,S> reactor.core.publisher.Flux<?> findByIdsUsingQuery(Collection<?> ids, Class<T> entityClass, Class<S> targetClass, Query query) Description copied from interface:ReactiveAerospikeOperations
Find records by ids, set name will be determined by the given entityClass.The records will be mapped to the given targetClass.
- Specified by:
findByIdsUsingQuery
in interfaceReactiveAerospikeOperations
- Parameters:
ids
- The ids of the documents to find. Must not be null.entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the record to.query
- TheQuery
to filter results. Optional argument (null if no filtering required).- Returns:
- The documents from Aerospike, returned documents will be mapped to targetClass's type if provided (otherwise to entityClass's type), if no document exists, an empty list is returned.
-
findByIdsUsingQuery
public <T,S> reactor.core.publisher.Flux<?> findByIdsUsingQuery(Collection<?> ids, Class<T> entityClass, Class<S> targetClass, String setName, Query query) Description copied from interface:ReactiveAerospikeOperations
Find records by ids within the given set name.The records will be mapped to the given targetClass.
- Specified by:
findByIdsUsingQuery
in interfaceReactiveAerospikeOperations
- Parameters:
ids
- The ids of the documents to find. Must not be null.entityClass
- The class to get the entity properties from (such as expiration). Must not be null.targetClass
- The class to map the record to.setName
- Set name to use.query
- TheQuery
to filter results. Optional argument (null if no filtering required).- Returns:
- The documents from Aerospike, returned documents will be mapped to targetClass's type if provided (otherwise to entityClass's type), if no document exists, an empty list is returned.
-
find
Description copied from interface:ReactiveAerospikeOperations
Reactively find records in the given entityClass's set using a query and map them to the given class type.- Specified by:
find
in interfaceReactiveAerospikeOperations
- Parameters:
query
- TheQuery
to filter results. Must not be null.entityClass
- The class to extract set name from and to map the documents to. Must not be null.- Returns:
- A Flux of matching records mapped to entityClass type.
-
find
public <T,S> reactor.core.publisher.Flux<S> find(Query query, Class<T> entityClass, Class<S> targetClass) Description copied from interface:ReactiveAerospikeOperations
Reactively find records in the given entityClass's set using a query and map them to the given target class type.- Specified by:
find
in interfaceReactiveAerospikeOperations
- Parameters:
query
- TheQuery
to filter results. Must not be null.entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the record to. Must not be null.- Returns:
- A Flux of matching records mapped to targetClass type.
-
find
Description copied from interface:ReactiveAerospikeOperations
Reactively find records in the given set using a query and map them to the given target class type.- Specified by:
find
in interfaceReactiveAerospikeOperations
- Parameters:
query
- TheQuery
to filter results. Must not be null.targetClass
- The class to map the record to. Must not be null.setName
- Set name to use.- Returns:
- A Flux of matching records mapped to targetClass type.
-
findAll
Description copied from interface:ReactiveAerospikeOperations
Reactively find all records in the given entityClass's set and map them to the given class type.- Specified by:
findAll
in interfaceReactiveAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from and to map the documents to. Must not be null.- Returns:
- A Flux of matching records mapped to entityClass type.
-
findAll
Description copied from interface:ReactiveAerospikeOperations
Reactively find all records in the given entityClass's set and map them to the given target class type.- Specified by:
findAll
in interfaceReactiveAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the record to. Must not be null.- Returns:
- A Flux of matching records mapped to targetClass type.
-
findAll
Description copied from interface:ReactiveAerospikeOperations
Reactively find all records in the given set and map them to the given class type.- Specified by:
findAll
in interfaceReactiveAerospikeOperations
- Parameters:
targetClass
- The class to map the documents to. Must not be null.setName
- The set name to find the document.- Returns:
- A Flux of matching records mapped to entityClass type.
-
findAll
public <T> reactor.core.publisher.Flux<T> findAll(Sort sort, long offset, long limit, Class<T> entityClass) Description copied from interface:ReactiveAerospikeOperations
Reactively find all records in the given entityClass's set using a provided sort and map them to the given class type.- Specified by:
findAll
in interfaceReactiveAerospikeOperations
- Parameters:
sort
- The sort to affect the returned iterable documents order.offset
- The offset to start the range from.limit
- The limit of the range.entityClass
- The class to extract set name from and to map the documents to.- Returns:
- A Flux of matching records mapped to entityClass type.
-
findAll
public <T,S> reactor.core.publisher.Flux<S> findAll(Sort sort, long offset, long limit, Class<T> entityClass, Class<S> targetClass) Description copied from interface:ReactiveAerospikeOperations
Reactively find all records in the given entityClass's set using a provided sort and map them to the given target class type.- Specified by:
findAll
in interfaceReactiveAerospikeOperations
- Parameters:
sort
- The sort to affect the returned iterable documents order.offset
- The offset to start the range from.limit
- The limit of the range.entityClass
- The class to extract set name from.targetClass
- The class to map the documents to. Must not be null.- Returns:
- A Flux of matching records mapped to targetClass type.
-
findAll
public <T> reactor.core.publisher.Flux<T> findAll(Sort sort, long offset, long limit, Class<T> targetClass, String setName) Description copied from interface:ReactiveAerospikeOperations
Reactively find all records in the given entityClass's set using a provided sort and map them to the given target class type.- Specified by:
findAll
in interfaceReactiveAerospikeOperations
- Parameters:
sort
- The sort to affect the returned iterable documents order.offset
- The offset to start the range from.limit
- The limit of the range.targetClass
- The class to map the documents to. Must not be null.setName
- The set name to find the documents.- Returns:
- A Flux of matching records mapped to targetClass type.
-
findInRange
public <T> reactor.core.publisher.Flux<T> findInRange(long offset, long limit, Sort sort, Class<T> entityClass) Description copied from interface:ReactiveAerospikeOperations
Reactively find records in the given entityClass's set using a range (offset, limit) and a sort and map them to the given class type.- Specified by:
findInRange
in interfaceReactiveAerospikeOperations
- Parameters:
offset
- The offset to start the range from.limit
- The limit of the range.sort
- The sort to affect the order of the returned Stream of documents.entityClass
- The class to extract set name from and to map the documents to. Must not be null.- Returns:
- A Flux of matching records mapped to entityClass type.
-
findInRange
public <T,S> reactor.core.publisher.Flux<S> findInRange(long offset, long limit, Sort sort, Class<T> entityClass, Class<S> targetClass) Description copied from interface:ReactiveAerospikeOperations
Reactively find records in the given entityClass's set using a range (offset, limit) and a sort and map them to the given target class type.- Specified by:
findInRange
in interfaceReactiveAerospikeOperations
- Parameters:
offset
- The offset to start the range from.limit
- The limit of the range.sort
- The sort to affect the returned Stream of documents order.entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the record to. Must not be null.- Returns:
- A Flux of matching records mapped to targetClass type.
-
findInRange
public <T> reactor.core.publisher.Flux<T> findInRange(long offset, long limit, Sort sort, Class<T> targetClass, String setName) Description copied from interface:ReactiveAerospikeOperations
Reactively find records in the given set using a range (offset, limit) and a sort and map them to the given class type.- Specified by:
findInRange
in interfaceReactiveAerospikeOperations
- Parameters:
offset
- The offset to start the range from.limit
- The limit of the range.sort
- The sort to affect the order of the returned Stream of documents.targetClass
- The class to map the record to. Must not be null.setName
- Set name to use.- Returns:
- A Flux of matching records mapped to entityClass type.
-
exists
Description copied from interface:ReactiveAerospikeOperations
Reactively check by id if a record exists within the set associated with the given entityClass.- Specified by:
exists
in interfaceReactiveAerospikeOperations
- Parameters:
id
- The id to check for record existence. Must not be null.entityClass
- The class to extract set name from. Must not be null.- Returns:
- A Mono of whether the record exists.
-
exists
Description copied from interface:ReactiveAerospikeOperations
Reactively check by id if a record exists within the given set name.- Specified by:
exists
in interfaceReactiveAerospikeOperations
- Parameters:
id
- The id to check for record existence. Must not be null.setName
- Set name to use.- Returns:
- A Mono of whether the record exists.
-
existsByQuery
Description copied from interface:ReactiveAerospikeOperations
Reactively check using a query if any matching records exist within the set determined by the given entityClass.- Specified by:
existsByQuery
in interfaceReactiveAerospikeOperations
- Parameters:
query
- The query to check if any returned document exists. Must not be null.entityClass
- The class to extract set name from. Must not be null.- Returns:
- A Mono of whether matching records exist.
-
existsByQuery
public <T> reactor.core.publisher.Mono<Boolean> existsByQuery(Query query, Class<T> entityClass, String setName) Description copied from interface:ReactiveAerospikeOperations
Reactively check using a query if any matching records exist within the given set.- Specified by:
existsByQuery
in interfaceReactiveAerospikeOperations
- Parameters:
query
- The query to check if any matching records exist. Must not be null.entityClass
- The class to translate to returned records into. Must not be null.setName
- Set name to use. Must not be null.- Returns:
- A Mono of whether matching records exist.
-
count
Description copied from interface:ReactiveAerospikeOperations
Reactively return the amount of records in the set determined by the given entityClass.- Specified by:
count
in interfaceReactiveAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.- Returns:
- A Mono of the amount of records in the set (of the given entityClass).
-
count
Description copied from interface:ReactiveAerospikeOperations
Reactively return the amount of records in the given Aerospike set.- Specified by:
count
in interfaceReactiveAerospikeOperations
- Parameters:
setName
- The name of the set to count. Must not be null.- Returns:
- A Mono of the amount of records in the given set.
-
count
Description copied from interface:ReactiveAerospikeOperations
Reactively return the amount of records in query results. Set name will be determined by the given entityClass.- Specified by:
count
in interfaceReactiveAerospikeOperations
- Parameters:
query
- The query that provides the result set for count.entityClass
- entityClass to extract set name from. Must not be null.- Returns:
- A Mono of the amount of records matching the given query and entity class.
-
count
Description copied from interface:ReactiveAerospikeOperations
Reactively return the amount of records in query results within the given set.- Specified by:
count
in interfaceReactiveAerospikeOperations
- Parameters:
query
- The query that provides the result set for count.setName
- The name of the set to count. Must not be null.- Returns:
- A Mono of the amount of records matching the given query and set name.
-
createIndex
public <T> reactor.core.publisher.Mono<Void> createIndex(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType) Description copied from interface:ReactiveAerospikeOperations
Reactively create an index with the specified name in Aerospike.- Specified by:
createIndex
in interfaceReactiveAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.indexName
- The index name. Must not be null.binName
- The bin name to create the index on. Must not be null.indexType
- The type of the index. Must not be null.
-
createIndex
public <T> reactor.core.publisher.Mono<Void> createIndex(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType, com.aerospike.client.query.IndexCollectionType indexCollectionType) Description copied from interface:ReactiveAerospikeOperations
Reactively create an index with the specified name in Aerospike.- Specified by:
createIndex
in interfaceReactiveAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.indexName
- The index name. Must not be null.binName
- The bin name to create the index on. Must not be null.indexType
- The type of the index. Must not be null.indexCollectionType
- The collection type of the index. Must not be null.
-
createIndex
public <T> reactor.core.publisher.Mono<Void> createIndex(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType, com.aerospike.client.query.IndexCollectionType indexCollectionType, com.aerospike.client.cdt.CTX... ctx) Description copied from interface:ReactiveAerospikeOperations
Reactively create an index with the specified name in Aerospike.- Specified by:
createIndex
in interfaceReactiveAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.indexName
- The index name. Must not be null.binName
- The bin name to create the index on. Must not be null.indexType
- The type of the index. Must not be null.indexCollectionType
- The collection type of the index. Must not be null.ctx
- optional context to index on elements within a CDT.
-
createIndex
public reactor.core.publisher.Mono<Void> createIndex(String setName, String indexName, String binName, com.aerospike.client.query.IndexType indexType) Description copied from interface:ReactiveAerospikeOperations
Reactively create an index with the specified name in Aerospike.- Specified by:
createIndex
in interfaceReactiveAerospikeOperations
- Parameters:
setName
- Set name to use.indexName
- The index name. Must not be null.binName
- The bin name to create the index on. Must not be null.indexType
- The type of the index. Must not be null.
-
createIndex
public reactor.core.publisher.Mono<Void> createIndex(String setName, String indexName, String binName, com.aerospike.client.query.IndexType indexType, com.aerospike.client.query.IndexCollectionType indexCollectionType) Description copied from interface:ReactiveAerospikeOperations
Reactively create an index with the specified name in Aerospike.- Specified by:
createIndex
in interfaceReactiveAerospikeOperations
- Parameters:
setName
- Set name to use.indexName
- The index name. Must not be null.binName
- The bin name to create the index on. Must not be null.indexType
- The type of the index. Must not be null.indexCollectionType
- The collection type of the index. Must not be null.
-
createIndex
public reactor.core.publisher.Mono<Void> createIndex(String setName, String indexName, String binName, com.aerospike.client.query.IndexType indexType, com.aerospike.client.query.IndexCollectionType indexCollectionType, com.aerospike.client.cdt.CTX... ctx) Description copied from interface:ReactiveAerospikeOperations
Reactively create an index with the specified name in Aerospike.- Specified by:
createIndex
in interfaceReactiveAerospikeOperations
- Parameters:
setName
- Set name to use.indexName
- The index name. Must not be null.binName
- The bin name to create the index on. Must not be null.indexType
- The type of the index. Must not be null.indexCollectionType
- The collection type of the index. Must not be null.ctx
- Optional context to index elements within a CDT.
-
deleteIndex
Description copied from interface:ReactiveAerospikeOperations
Reactively delete an index with the specified name in Aerospike.- Specified by:
deleteIndex
in interfaceReactiveAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.indexName
- The index name. Must not be null.
-
deleteIndex
Description copied from interface:ReactiveAerospikeOperations
Reactively delete an index with the specified name within the given set in Aerospike.- Specified by:
deleteIndex
in interfaceReactiveAerospikeOperations
- Parameters:
setName
- Set name to use.indexName
- The index name. Must not be null.
-
indexExists
Description copied from interface:ReactiveAerospikeOperations
Check whether an index with the specified name exists in Aerospike.- Specified by:
indexExists
in interfaceReactiveAerospikeOperations
- Parameters:
indexName
- The Aerospike index name. Must not be null.- Returns:
- Mono of true if exists.
-
getAerospikeReactorClient
public com.aerospike.client.reactor.IAerospikeReactorClient getAerospikeReactorClient()- Specified by:
getAerospikeReactorClient
in interfaceReactiveAerospikeOperations
- Returns:
- Aerospike reactive client in use.
-
getQueryMaxRecords
public long getQueryMaxRecords()- Specified by:
getQueryMaxRecords
in interfaceReactiveAerospikeOperations
- Returns:
- Value of configuration parameter
invalid reference
AerospikeDataSettings#getQueryMaxRecords()
-
findUsingQueryWithoutPostProcessing
public <T,S> reactor.core.publisher.Flux<S> findUsingQueryWithoutPostProcessing(Class<T> entityClass, Class<S> targetClass, Query query) Description copied from interface:ReactiveAerospikeOperations
Reactively find records in the given entityClass's set using a query and map them to the given target class type. If the query has pagination and/or sorting, post-processing must be applied separately.- Specified by:
findUsingQueryWithoutPostProcessing
in interfaceReactiveAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the record to.query
- TheQuery
to filter results.- Returns:
- A Flux of all matching records mapped to targetClass type (regardless of pagination/sorting).
-
getSetName
-
getSetName
-
getMappingContext
-
getAerospikeConverter
-
getNamespace
-
getBatchWriteForSave
public <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData<T> getBatchWriteForSave(T document, String setName) -
getBatchWriteForInsert
public <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData<T> getBatchWriteForInsert(T document, String setName) -
getBatchWriteForUpdate
public <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData<T> getBatchWriteForUpdate(T document, String setName) -
getBatchWriteForDelete
public <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData<T> getBatchWriteForDelete(T document, String setName)
-