Interface ReactiveAerospikeOperations

All Known Implementing Classes:
ReactiveAerospikeTemplate

public interface ReactiveAerospikeOperations
Aerospike specific data access operations to work with reactive API
Author:
Igor Ermolenko
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> reactor.core.publisher.Mono<T>
    add(T document, String binName, long value)
    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>
    add(T document, String setName, String binName, long value)
    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>
    add(T document, String setName, Map<String,Long> values)
    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>
    add(T document, Map<String,Long> values)
    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>
    append(T document, String binName, String value)
    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>
    append(T document, String setName, String binName, String value)
    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>
    append(T document, String setName, Map<String,String> values)
    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>
    append(T document, Map<String,String> values)
    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>
    count(Class<T> entityClass)
    Reactively return the amount of records in the set determined by the given entityClass.
    reactor.core.publisher.Mono<Long>
    count(String setName)
    Reactively return the amount of records in the given Aerospike set.
    <T> reactor.core.publisher.Mono<Long>
    count(Query query, Class<T> entityClass)
    Reactively return the amount of records in query results.
    reactor.core.publisher.Mono<Long>
    count(Query query, String setName)
    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>
    delete(Class<T> entityClass)
    Deprecated.
    since 4.6.0, use AerospikeOperations.deleteAll(Class) instead.
    <T> reactor.core.publisher.Mono<Boolean>
    delete(Object id, Class<T> entityClass)
    Deprecated.
    <T> reactor.core.publisher.Mono<Boolean>
    delete(T document)
    Reactively delete a record using the document's id.
    <T> reactor.core.publisher.Mono<Boolean>
    delete(T document, String setName)
    Reactively delete a record within the given set using the document's id.
    <T> reactor.core.publisher.Mono<Void>
    deleteAll(Class<T> entityClass)
    Reactively truncate/delete all records in the set determined by the given entity class.
    <T> reactor.core.publisher.Mono<Void>
    deleteAll(Class<T> entityClass, Instant beforeLastUpdate)
    Reactively truncate/delete all records in the set determined by the given entity class.
    <T> reactor.core.publisher.Mono<Void>
    deleteAll(Iterable<T> documents)
    Reactively delete multiple records in one batch request.
    <T> reactor.core.publisher.Mono<Void>
    deleteAll(Iterable<T> documents, String setName)
    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>
    deleteAll(String setName)
    Reactively truncate/delete all the documents in the given set.
    reactor.core.publisher.Mono<Void>
    deleteAll(String setName, Instant beforeLastUpdate)
    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>
    execute(Supplier<T> supplier)
    Reactively execute operation against underlying store.
    <T> reactor.core.publisher.Mono<Boolean>
    exists(Object id, Class<T> entityClass)
    Reactively check by id if a record exists within the set associated with the given entityClass.
    reactor.core.publisher.Mono<Boolean>
    exists(Object id, String setName)
    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>
    find(Query query, Class<T> entityClass)
    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>
    find(Query query, Class<T> entityClass, Class<S> targetClass)
    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>
    find(Query query, Class<T> targetClass, String setName)
    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>
    findAll(Class<T> entityClass)
    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>
    findAll(Class<T> entityClass, Class<S> targetClass)
    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>
    findAll(Class<T> targetClass, String setName)
    Reactively find all records in the given set and map them to the given class type.
    <T> reactor.core.publisher.Flux<T>
    findAll(Sort sort, long offset, long limit, Class<T> entityClass)
    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>
    findAll(Sort sort, long offset, long limit, Class<T> entityClass, Class<S> targetClass)
    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>
    findAll(Sort sort, long offset, long limit, Class<T> targetClass, String setName)
    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>
    findById(Object id, Class<T> entityClass)
    Reactively find a record by id, set name will be determined by the given entityClass.
    <T, S> reactor.core.publisher.Mono<S>
    findById(Object id, Class<T> entityClass, Class<S> targetClass)
    Reactively find a record by id, set name will be determined by the given entityClass.
    <T, S> reactor.core.publisher.Mono<S>
    findById(Object id, Class<T> entityClass, Class<S> targetClass, String setName)
    Reactively find a record by id within the given set.
    <T> reactor.core.publisher.Mono<T>
    findById(Object id, Class<T> entityClass, String setName)
    Reactively find a record by id within the given set.
    <T> reactor.core.publisher.Flux<T>
    findByIds(Iterable<?> ids, Class<T> entityClass)
    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>
    findByIds(Iterable<?> ids, Class<T> entityClass, Class<S> targetClass)
    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>
    findByIds(Iterable<?> ids, Class<T> targetClass, String setName)
    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
     
     
    long
     
    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 using RecordExistsAction.CREATE_ONLY policy.
    <T> reactor.core.publisher.Mono<T>
    insert(T document, String setName)
    Reactively insert a document within the given set using RecordExistsAction.CREATE_ONLY policy.
    <T> reactor.core.publisher.Flux<T>
    insertAll(Iterable<? extends T> documents)
    Reactively insert documents using one batch request.
    <T> reactor.core.publisher.Flux<T>
    insertAll(Iterable<? extends T> documents, String setName)
    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 writePolicy)
    Reactively persist a document using specified WritePolicy.
    <T> reactor.core.publisher.Mono<T>
    persist(T document, com.aerospike.client.policy.WritePolicy writePolicy, String setName)
    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>
    prepend(T document, String binName, String value)
    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>
    prepend(T document, String setName, String binName, String value)
    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>
    prepend(T document, String setName, Map<String,String> values)
    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>
    prepend(T document, Map<String,String> values)
    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.
    <T> reactor.core.publisher.Mono<T>
    save(T document)
    Reactively save a document.
    <T> reactor.core.publisher.Mono<T>
    save(T document, String setName)
    Reactively save a document within the given set.
    <T> reactor.core.publisher.Flux<T>
    saveAll(Iterable<T> documents)
    Reactively save documents using one batch request.
    <T> reactor.core.publisher.Flux<T>
    saveAll(Iterable<T> documents, String setName)
    Reactively save documents within the given set using one batch request.
    <T> reactor.core.publisher.Mono<T>
    update(T document)
    Reactively update a record using RecordExistsAction.UPDATE_ONLY policy combined with removing bins at first (analogous to RecordExistsAction.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)
    Reactively update a record within the given set using RecordExistsAction.UPDATE_ONLY policy combined with removing bins at first (analogous to RecordExistsAction.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 using RecordExistsAction.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 using RecordExistsAction.UPDATE_ONLY policy.
    <T> reactor.core.publisher.Flux<T>
    updateAll(Iterable<? extends T> documents)
    Reactively update records using one batch request.
    <T> reactor.core.publisher.Flux<T>
    updateAll(Iterable<? extends T> documents, String setName)
    Reactively update records within the given set using one batch request.
  • Method Details

    • getMappingContext

      MappingContext<?,?> getMappingContext()
      Returns:
      Mapping context in use.
    • getAerospikeConverter

      MappingAerospikeConverter getAerospikeConverter()
      Returns:
      converter in use.
    • getAerospikeReactorClient

      com.aerospike.client.reactor.IAerospikeReactorClient getAerospikeReactorClient()
      Returns:
      Aerospike reactive client in use.
    • getQueryMaxRecords

      long getQueryMaxRecords()
      Returns:
      Value of configuration parameter
      invalid reference
      AerospikeDataSettings#getQueryMaxRecords()
      .
    • save

      <T> reactor.core.publisher.Mono<T> save(T document)
      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 to RecordExistsAction.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 to RecordExistsAction.REPLACE). This means that when such record does not exist it will be created, otherwise updated (an "upsert").

      Parameters:
      document - The document to be saved. Must not be null.
      Returns:
      A Mono of the new saved document.
      Throws:
      OptimisticLockingFailureException - if the document has a version attribute with a different value from that found on server.
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • save

      <T> reactor.core.publisher.Mono<T> save(T document, String setName)
      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 to RecordExistsAction.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 to RecordExistsAction.REPLACE). This means that when such record does not exist it will be created, otherwise updated (an "upsert").

      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.
      Throws:
      OptimisticLockingFailureException - if the document has a version attribute with a different value from that found on server.
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • saveAll

      <T> reactor.core.publisher.Flux<T> saveAll(Iterable<T> documents)
      Reactively save documents using one batch request. The policies are analogous to save(Object).

      The order of returned results is preserved. The execution order is NOT preserved.

      Requires Server version 6.0+.

      Parameters:
      documents - The documents to be saved. Must not be null.
      Returns:
      A Flux of the saved documents
      Throws:
      com.aerospike.client.AerospikeException.BatchRecordArray - if batch save succeeds, but results contain errors or null records.
      OptimisticLockingFailureException - if at least one document has a version attribute with a different value from that found on server.
      DataAccessException - if batch operation failed (see DefaultAerospikeExceptionTranslator for details).
    • saveAll

      <T> reactor.core.publisher.Flux<T> saveAll(Iterable<T> documents, String setName)
      Reactively save documents within the given set using one batch request. The policies are analogous to save(Object).

      The order of returned results is preserved. The execution order is NOT preserved.

      Requires Server version 6.0+.

      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
      Throws:
      com.aerospike.client.AerospikeException.BatchRecordArray - if batch save succeeds, but results contain errors or null records.
      OptimisticLockingFailureException - if at least one document has a version attribute with a different value from that found on server.
      DataAccessException - if batch operation failed (see DefaultAerospikeExceptionTranslator for details).
    • insert

      <T> reactor.core.publisher.Mono<T> insert(T document)
      Reactively insert a document using RecordExistsAction.CREATE_ONLY policy.

      If the document has version property it will be updated with the server's version after successful operation.

      Parameters:
      document - The document to be inserted. Must not be null.
      Returns:
      A Mono of the new inserted document.
      Throws:
      OptimisticLockingFailureException - if the document has a version attribute with a different value from that found on server.
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • insert

      <T> reactor.core.publisher.Mono<T> insert(T document, String setName)
      Reactively insert a document within the given set using RecordExistsAction.CREATE_ONLY policy.

      If the document has version property it will be updated with the server's version after successful operation.

      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.
      Throws:
      OptimisticLockingFailureException - if the document has a version attribute with a different value from that found on server.
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • insertAll

      <T> reactor.core.publisher.Flux<T> insertAll(Iterable<? extends T> documents)
      Reactively insert documents using one batch request. The policies are analogous to insert(Object).

      The order of returned results is preserved. The execution order is NOT preserved.

      Requires Server version 6.0+.

      Parameters:
      documents - Documents to insert. Must not be null.
      Returns:
      A Flux of the inserted documents
      Throws:
      com.aerospike.client.AerospikeException.BatchRecordArray - if batch insert succeeds, but results contain errors or null records.
      OptimisticLockingFailureException - if at least one document has a version attribute with a different value from that found on server.
      DataAccessException - if batch operation failed (see DefaultAerospikeExceptionTranslator for details).
    • insertAll

      <T> reactor.core.publisher.Flux<T> insertAll(Iterable<? extends T> documents, String setName)
      Reactively insert documents within the given set using one batch request. The policies are analogous to insert(Object).

      The order of returned results is preserved. The execution order is NOT preserved.

      Requires Server version 6.0+.

      Parameters:
      documents - Documents to insert. Must not be null.
      setName - The set name to insert the documents.
      Returns:
      A Flux of the inserted documents
      Throws:
      com.aerospike.client.AerospikeException.BatchRecordArray - if batch insert succeeds, but results contain errors or null records.
      OptimisticLockingFailureException - if at least one document has a version attribute with a different value from that found on server.
      DataAccessException - if batch operation failed (see DefaultAerospikeExceptionTranslator for details).
    • persist

      <T> reactor.core.publisher.Mono<T> persist(T document, com.aerospike.client.policy.WritePolicy writePolicy)
      Reactively persist a document using specified WritePolicy.
      Parameters:
      document - The document to be persisted. Must not be null.
      writePolicy - The Aerospike write policy for the inner Aerospike put operation. Must not be null.
      Returns:
      A Mono of the new persisted document.
      Throws:
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • persist

      <T> reactor.core.publisher.Mono<T> persist(T document, com.aerospike.client.policy.WritePolicy writePolicy, String setName)
      Reactively persist a document within the given set (overrides the default set associated with the document) using specified WritePolicy.
      Parameters:
      document - The document to be persisted. Must not be null.
      writePolicy - 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.
      Throws:
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • update

      <T> reactor.core.publisher.Mono<T> update(T document)
      Reactively update a record using RecordExistsAction.UPDATE_ONLY policy combined with removing bins at first (analogous to RecordExistsAction.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.

      Parameters:
      document - The document that identifies the record to be updated. Must not be null.
      Returns:
      A Mono of the new updated document.
      Throws:
      OptimisticLockingFailureException - if the document has a version attribute with a different value from that found on server.
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • update

      <T> reactor.core.publisher.Mono<T> update(T document, String setName)
      Reactively update a record within the given set using RecordExistsAction.UPDATE_ONLY policy combined with removing bins at first (analogous to RecordExistsAction.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.

      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.
      Throws:
      OptimisticLockingFailureException - if the document has a version attribute with a different value from that found on server.
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • update

      <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 using RecordExistsAction.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.

      Parameters:
      document - The document that identifies the record to be updated. Must not be null.
      Returns:
      A Mono of the new updated document.
      Throws:
      OptimisticLockingFailureException - if the document has a version attribute with a different value from that found on server.
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • update

      <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 using RecordExistsAction.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.

      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.
      Throws:
      OptimisticLockingFailureException - if the document has a version attribute with a different value from that found on server.
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • updateAll

      <T> reactor.core.publisher.Flux<T> updateAll(Iterable<? extends T> documents)
      Reactively update records using one batch request. The policies are analogous to update(Object).

      The order of returned results is preserved. The execution order is NOT preserved.

      Requires Server version 6.0+.

      Parameters:
      documents - The documents that identify the records to be updated. Must not be null.
      Returns:
      A Flux of the updated documents
      Throws:
      com.aerospike.client.AerospikeException.BatchRecordArray - if batch update succeeds, but results contain errors or null records.
      OptimisticLockingFailureException - if at least one document has a version attribute with a different value from that found on server.
      DataAccessException - if batch operation failed (see DefaultAerospikeExceptionTranslator for details).
    • updateAll

      <T> reactor.core.publisher.Flux<T> updateAll(Iterable<? extends T> documents, String setName)
      Reactively update records within the given set using one batch request. The policies are analogous to update(Object).

      The order of returned results is preserved. The execution order is NOT preserved.

      Requires Server version 6.0+.

      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
      Throws:
      com.aerospike.client.AerospikeException.BatchRecordArray - if batch update succeeds, but results contain errors or null records.
      OptimisticLockingFailureException - if at least one document has a version attribute with a different value from that found on server.
      DataAccessException - if batch operation failed (see DefaultAerospikeExceptionTranslator for details).
    • delete

      <T> reactor.core.publisher.Mono<Void> delete(Class<T> entityClass)
      Deprecated.
      since 4.6.0, use AerospikeOperations.deleteAll(Class) instead.
      Reactively truncate/delete all records from the set determined by the given entityClass.
      Parameters:
      entityClass - The class to extract the Aerospike set name from. Must not be null.
    • delete

      <T> reactor.core.publisher.Mono<Boolean> delete(Object id, Class<T> entityClass)
      Deprecated.
      Reactively delete a record by id, set name will be determined by the given entity class.
      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

      <T> reactor.core.publisher.Mono<Boolean> delete(T document)
      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.

      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.
      Throws:
      OptimisticLockingFailureException - if the document has a version attribute with a different value from that found on server.
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • delete

      <T> reactor.core.publisher.Mono<Boolean> delete(T document, String setName)
      Reactively delete a record within the given set using the document's id.
      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.
      Throws:
      OptimisticLockingFailureException - if the document has a version attribute with a different value from that found on server.
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • deleteAll

      <T> reactor.core.publisher.Mono<Void> deleteAll(Iterable<T> documents)
      Reactively delete multiple records in one batch request. The policies are analogous to delete(Object).

      The execution order is NOT preserved.

      This operation requires Server version 6.0+.

      Parameters:
      documents - The documents to be deleted. Must not be null.
      Throws:
      com.aerospike.client.AerospikeException.BatchRecordArray - if batch save succeeds, but results contain errors or null records.
      OptimisticLockingFailureException - if at least one document has a version attribute with a different value from that found on server.
      DataAccessException - if batch operation failed (see DefaultAerospikeExceptionTranslator for details).
    • deleteAll

      <T> reactor.core.publisher.Mono<Void> deleteAll(Iterable<T> documents, String setName)
      Reactively delete multiple records within the given set (overrides the default set associated with the documents) in one batch request. The policies are analogous to delete(Object).

      The execution order is NOT preserved.

      This operation requires Server version 6.0+.

      Parameters:
      documents - The documents to be deleted. Must not be null.
      setName - Set name to override the default set associated with the documents.
      Throws:
      com.aerospike.client.AerospikeException.BatchRecordArray - if batch delete results contain errors.
      OptimisticLockingFailureException - if at least one document has a version attribute with a different value from that found on server.
      DataAccessException - if batch operation failed (see DefaultAerospikeExceptionTranslator for details).
    • deleteById

      <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.

      If the document has version property it is not compared with the corresponding record's version on server.

      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.
      Throws:
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • deleteById

      reactor.core.publisher.Mono<Boolean> deleteById(Object id, String setName)
      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.

      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.
      Throws:
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • deleteByIds

      <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. The policies are analogous to deleteById(Object, Class).

      This operation requires Server version 6.0+.

      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.
      Throws:
      com.aerospike.client.AerospikeException.BatchRecordArray - if batch delete results contain errors.
      DataAccessException - if batch operation failed (see DefaultAerospikeExceptionTranslator for details).
    • deleteByIds

      reactor.core.publisher.Mono<Void> deleteByIds(Iterable<?> ids, String setName)
      Reactively delete records within the given set using a single batch delete operation. The policies are analogous to deleteById(Object, String).

      This operation requires Server version 6.0+.

      Parameters:
      ids - The ids of the documents to find. Must not be null.
      setName - Set name to use.
      Throws:
      com.aerospike.client.AerospikeException.BatchRecordArray - if batch delete results contain errors.
      DataAccessException - if batch operation failed (see DefaultAerospikeExceptionTranslator for details).
    • deleteByIds

      reactor.core.publisher.Mono<Void> deleteByIds(GroupedKeys groupedKeys)
      Reactively delete records from different sets in a single request.

      Records' versions on server are not checked.

      This operation requires Server version 6.0+.

      Parameters:
      groupedKeys - Keys grouped by document type. Must not be null, groupedKeys.getEntitiesKeys() must not be null.
      Throws:
      com.aerospike.client.AerospikeException.BatchRecordArray - if batch delete results contain errors.
      DataAccessException - if batch operation failed (see DefaultAerospikeExceptionTranslator for details).
    • deleteAll

      <T> reactor.core.publisher.Mono<Void> deleteAll(Class<T> entityClass)
      Reactively truncate/delete all records in the set determined by the given entity class.
      Parameters:
      entityClass - The class to extract set name from. Must not be null.
      Throws:
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • deleteAll

      <T> reactor.core.publisher.Mono<Void> deleteAll(Class<T> entityClass, Instant beforeLastUpdate)
      Reactively truncate/delete all records in the set determined by the given entity class.
      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).
      Throws:
      DataAccessException - If operation failed (see DefaultAerospikeExceptionTranslator for details).
    • deleteAll

      reactor.core.publisher.Mono<Void> deleteAll(String setName)
      Reactively truncate/delete all the documents in the given set.
      Parameters:
      setName - Set name to use.
      Throws:
      DataAccessException - if operation failed (see DefaultAerospikeExceptionTranslator for details).
    • deleteAll

      reactor.core.publisher.Mono<Void> deleteAll(String setName, Instant beforeLastUpdate)
      Reactively truncate/delete all documents in the given set.
      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).
      Throws:
      DataAccessException - If operation failed (see DefaultAerospikeExceptionTranslator for details).
    • add

      <T> reactor.core.publisher.Mono<T> add(T document, Map<String,Long> values)
      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.
      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

      <T> reactor.core.publisher.Mono<T> add(T document, String setName, Map<String,Long> values)
      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.
      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

      <T> reactor.core.publisher.Mono<T> add(T document, String binName, long value)
      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.
      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

      <T> reactor.core.publisher.Mono<T> add(T document, String setName, String binName, long value)
      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.
      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

      <T> reactor.core.publisher.Mono<T> append(T document, Map<String,String> values)
      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.
      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

      <T> reactor.core.publisher.Mono<T> append(T document, String setName, Map<String,String> values)
      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.
      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

      <T> reactor.core.publisher.Mono<T> append(T document, String binName, String value)
      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.
      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

      <T> reactor.core.publisher.Mono<T> append(T document, String setName, String binName, String value)
      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.
      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

      <T> reactor.core.publisher.Mono<T> prepend(T document, Map<String,String> values)
      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.
      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

      <T> reactor.core.publisher.Mono<T> prepend(T document, String setName, Map<String,String> values)
      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.
      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

      <T> reactor.core.publisher.Mono<T> prepend(T document, String binName, String value)
      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.
      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

      <T> reactor.core.publisher.Mono<T> prepend(T document, String setName, String binName, String value)
      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.
      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

      <T> reactor.core.publisher.Mono<T> execute(Supplier<T> supplier)
      Reactively execute operation against underlying store.
      Parameters:
      supplier - must not be null.
      Returns:
      A Mono of the execution result.
    • findById

      <T> reactor.core.publisher.Mono<T> findById(Object id, Class<T> entityClass)
      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.

      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

      <T> reactor.core.publisher.Mono<T> findById(Object id, Class<T> entityClass, String setName)
      Reactively find a record by id within the given set.

      The matching record will be mapped to the given entityClass.

      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

      <T, S> reactor.core.publisher.Mono<S> findById(Object id, Class<T> entityClass, Class<S> targetClass)
      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.

      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

      <T, S> reactor.core.publisher.Mono<S> findById(Object id, Class<T> entityClass, Class<S> targetClass, String setName)
      Reactively find a record by id within the given set.

      The matching record will be mapped to the given targetClass.

      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

      <T> reactor.core.publisher.Flux<T> findByIds(Iterable<?> ids, Class<T> entityClass)
      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.

      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

      <T, S> reactor.core.publisher.Flux<S> findByIds(Iterable<?> ids, Class<T> entityClass, Class<S> targetClass)
      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.

      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

      <T> reactor.core.publisher.Flux<T> findByIds(Iterable<?> ids, Class<T> targetClass, String setName)
      Reactively find records by ids within the given set using a single batch read operation.

      The records will be mapped to the given entityClass.

      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

      reactor.core.publisher.Mono<GroupedEntities> findByIds(GroupedKeys groupedKeys)
      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.

      Parameters:
      groupedKeys - Keys grouped by document type. Must not be null, groupedKeys.getEntitiesKeys() must not be null.
      Returns:
      Mono of grouped documents.
    • findByIdUsingQuery

      <T, S> reactor.core.publisher.Mono<?> findByIdUsingQuery(Object id, Class<T> entityClass, Class<S> targetClass, @Nullable Query query)
      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.

      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 - The Query to filter results. Optional argument (null if no filtering required).
      Returns:
      The matching record mapped to targetClass's type.
    • findByIdUsingQuery

      <T, S> reactor.core.publisher.Mono<?> findByIdUsingQuery(Object id, Class<T> entityClass, Class<S> targetClass, String setName, @Nullable Query query)
      Find a record by id within the given set using a query.

      The records will be mapped to the given targetClass.

      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 - The Query to filter results. Optional argument (null if no filtering required).
      Returns:
      The matching record mapped to targetClass's type.
    • findByIdsUsingQuery

      <T, S> reactor.core.publisher.Flux<?> findByIdsUsingQuery(Collection<?> ids, Class<T> entityClass, Class<S> targetClass, @Nullable Query query)
      Find records by ids, set name will be determined by the given entityClass.

      The records will be mapped to the given targetClass.

      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 - The Query 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

      <T, S> reactor.core.publisher.Flux<?> findByIdsUsingQuery(Collection<?> ids, Class<T> entityClass, Class<S> targetClass, String setName, @Nullable Query query)
      Find records by ids within the given set name.

      The records will be mapped to the given targetClass.

      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 - The Query 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

      <T> reactor.core.publisher.Flux<T> find(Query query, Class<T> entityClass)
      Reactively find records in the given entityClass's set using a query and map them to the given class type.
      Parameters:
      query - The Query 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

      <T, S> reactor.core.publisher.Flux<S> find(Query query, Class<T> entityClass, Class<S> targetClass)
      Reactively find records in the given entityClass's set using a query and map them to the given target class type.
      Parameters:
      query - The Query 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

      <T> reactor.core.publisher.Flux<T> find(Query query, Class<T> targetClass, String setName)
      Reactively find records in the given set using a query and map them to the given target class type.
      Parameters:
      query - The Query 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

      <T> reactor.core.publisher.Flux<T> findAll(Class<T> entityClass)
      Reactively find all records in the given entityClass's set and map them to the given class type.
      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

      <T, S> reactor.core.publisher.Flux<S> findAll(Class<T> entityClass, Class<S> targetClass)
      Reactively find all records in the given entityClass's set and map them to the given target class type.
      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

      <T> reactor.core.publisher.Flux<T> findAll(Class<T> targetClass, String setName)
      Reactively find all records in the given set and map them to the given class type.
      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

      <T> reactor.core.publisher.Flux<T> findAll(Sort sort, long offset, long limit, Class<T> entityClass)
      Reactively find all records in the given entityClass's set using a provided sort and map them to the given class type.
      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

      <T, S> reactor.core.publisher.Flux<S> findAll(Sort sort, long offset, long limit, Class<T> entityClass, Class<S> targetClass)
      Reactively find all records in the given entityClass's set using a provided sort and map them to the given target class type.
      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

      <T> reactor.core.publisher.Flux<T> findAll(Sort sort, long offset, long limit, Class<T> targetClass, String setName)
      Reactively find all records in the given entityClass's set using a provided sort and map them to the given target class type.
      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

      <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.
      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

      <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.
      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.
    • findInRange

      <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.
      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.
    • findUsingQueryWithoutPostProcessing

      <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. If the query has pagination and/or sorting, post-processing must be applied separately.
      Parameters:
      entityClass - The class to extract set name from. Must not be null.
      targetClass - The class to map the record to.
      query - The Query to filter results.
      Returns:
      A Flux of all matching records mapped to targetClass type (regardless of pagination/sorting).
    • exists

      <T> reactor.core.publisher.Mono<Boolean> exists(Object id, Class<T> entityClass)
      Reactively check by id if a record exists within the set associated with the given entityClass.
      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

      reactor.core.publisher.Mono<Boolean> exists(Object id, String setName)
      Reactively check by id if a record exists within the given set name.
      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

      <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.
      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

      <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.
      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

      <T> reactor.core.publisher.Mono<Long> count(Class<T> entityClass)
      Reactively return the amount of records in the set determined by the given entityClass.
      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

      reactor.core.publisher.Mono<Long> count(String setName)
      Reactively return the amount of records in the given Aerospike set.
      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

      <T> reactor.core.publisher.Mono<Long> count(Query query, Class<T> entityClass)
      Reactively return the amount of records in query results. Set name will be determined by the given entityClass.
      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

      reactor.core.publisher.Mono<Long> count(Query query, String setName)
      Reactively return the amount of records in query results within the given set.
      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

      <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.
      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

      <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.
      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

      <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.
      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

      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.
      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

      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.
      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

      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.
      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

      <T> reactor.core.publisher.Mono<Void> deleteIndex(Class<T> entityClass, String indexName)
      Reactively delete an index with the specified name in Aerospike.
      Parameters:
      entityClass - The class to extract set name from. Must not be null.
      indexName - The index name. Must not be null.
    • deleteIndex

      reactor.core.publisher.Mono<Void> deleteIndex(String setName, String indexName)
      Reactively delete an index with the specified name within the given set in Aerospike.
      Parameters:
      setName - Set name to use.
      indexName - The index name. Must not be null.
    • indexExists

      reactor.core.publisher.Mono<Boolean> indexExists(String indexName)
      Check whether an index with the specified name exists in Aerospike.
      Parameters:
      indexName - The Aerospike index name. Must not be null.
      Returns:
      Mono of true if exists.