Class AerospikeTemplate

java.lang.Object
org.springframework.data.aerospike.core.AerospikeTemplate
All Implemented Interfaces:
AerospikeOperations

public class AerospikeTemplate extends Object implements AerospikeOperations
Primary implementation of AerospikeOperations.
Author:
Oliver Gierke, Peter Milne, Anastasiia Smirnova, Igor Ermolenko, Roman Terentiev
  • Constructor Summary

    Constructors
    Constructor
    Description
    AerospikeTemplate(com.aerospike.client.IAerospikeClient client, String namespace, MappingAerospikeConverter converter, AerospikeMappingContext mappingContext, AerospikeExceptionTranslator exceptionTranslator, QueryEngine queryEngine, IndexRefresher indexRefresher)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    add(T document, String binName, long value)
    Add integer/double bin value to existing document bin value, read the new modified document and map it back the given document class type.
    <T> T
    add(T document, Map<String,Long> values)
    Add integer/double bin values to existing document bin values, read the new modified document and map it back the given document class type.
    <T> com.aerospike.client.query.ResultSet
    aggregate(com.aerospike.client.query.Filter filter, Class<T> entityClass, String module, String function, List<com.aerospike.client.Value> arguments)
    Execute query, apply statement's aggregation function, and return result iterator.
    <T> T
    append(T document, String binName, String value)
    Append bin string value to existing document bin value, read the new modified document and map it back the given document class type.
    <T> T
    append(T document, Map<String,String> values)
    Append bin string values to existing document bin values, read the new modified document and map it back the given document class type.
    <T> long
    count(Class<T> entityClass)
    Return the amount of documents in the given entityClass's Aerospike set.
    long
    count(String setName)
    Return the amount of documents in the given Aerospike set.
    <T> long
    count(Query query, Class<T> entityClass)
    Return the amount of documents in query results.
    <T> void
    createIndex(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType)
    Create an index with the specified name in Aerospike.
    <T> void
    createIndex(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType, com.aerospike.client.query.IndexCollectionType indexCollectionType)
    Create an index with the specified name in Aerospike.
    <T> 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)
    Create an index with the specified name in Aerospike.
    <T> void
    delete(Class<T> entityClass)
    Truncate/Delete all the documents in the given entity's set.
    <T> boolean
    delete(Object id, Class<T> entityClass)
    Delete a document by id, set name will be determined by the given entityClass.
    <T> boolean
    delete(T document)
    Delete a document.
    <T> void
    deleteIndex(Class<T> entityClass, String indexName)
    Delete an index with the specified name from Aerospike.
    <T> T
    execute(Supplier<T> supplier)
    Execute operation against underlying store.
    <T> boolean
    exists(Object id, Class<T> entityClass)
    Check if a document exists by providing document id and entityClass (set name will be determined by the given entityClass).
    <T> boolean
    exists(Query query, Class<T> entityClass)
     
    <T> Stream<T>
    find(Query query, Class<T> entityClass)
    Find documents in the given entityClass's set using a query and map them to the given class type.
    <T, S> Stream<S>
    find(Query query, Class<T> entityClass, Class<S> targetClass)
    Find documents in the given entityClass's set using a query and map them to the given target class type.
    <T> Stream<T>
    findAll(Class<T> entityClass)
    Find all documents in the given entityClass's set and map them to the given class type.
    <T, S> Stream<S>
    findAll(Class<T> entityClass, Class<S> targetClass)
    Find all documents in the given entityClass's set and map them to the given target class type.
    <T> Stream<T>
    findAll(Sort sort, long offset, long limit, Class<T> entityClass)
    Find all documents in the given entityClass's set using a provided sort and map them to the given class type.
    <T, S> Stream<S>
    findAll(Sort sort, long offset, long limit, Class<T> entityClass, Class<S> targetClass)
    Find all documents in the given entityClass's set using a provided sort and map them to the given target class type.
    <T> T
    findById(Object id, Class<T> entityClass)
    Find a document by id, set name will be determined by the given entityClass.
    <T, S> S
    findById(Object id, Class<T> entityClass, Class<S> targetClass)
    Find a document by id, set name will be determined by the given entityClass.
    <T> List<T>
    findByIds(Iterable<?> ids, Class<T> entityClass)
    Find documents by providing multiple ids using a single batch read operation, set name will be determined by the given entityClass.
    <T, S> List<S>
    findByIds(Iterable<?> ids, Class<T> entityClass, Class<S> targetClass)
    Find documents by providing multiple ids using a single batch read operation, set name will be determined by the given entityClass.
    findByIds(GroupedKeys groupedKeys)
    Executes a single batch request to get results for several entities.
    <T> Stream<T>
    findInRange(long offset, long limit, Sort sort, Class<T> entityClass)
    Find documents in the given entityClass's set using a range (offset, limit) and a sort and map them to the given class type.
    <T, S> Stream<S>
    findInRange(long offset, long limit, Sort sort, Class<T> entityClass, Class<S> targetClass)
    Find documents in the given entityClass's set using a range (offset, limit) and a sort and map them to the given target class type.
    com.aerospike.client.IAerospikeClient
     
     
     
    <T> String
    getSetName(Class<T> entityClass)
     
    boolean
    indexExists(String indexName)
    Checks whether an index with the specified name exists in Aerospike.
    <T> void
    insert(T document)
    Insert a document using RecordExistsAction.CREATE_ONLY policy.
    <T> void
    insertAll(Collection<? extends T> documents)
    Insert each document of the given documents using single insert operations.
    <T> void
    persist(T document, com.aerospike.client.policy.WritePolicy policy)
    Persist a document using specified WritePolicy.
    <T> T
    prepend(T document, String fieldName, String value)
    Prepend bin string value to existing document bin value, read the new modified document and map it back the given document class type.
    <T> T
    prepend(T document, Map<String,String> values)
    Prepend bin string values to existing document bin values, read the new modified document and map it back the given document class type.
    <T> void
    save(T document)
    Save a document.
    <T> void
    update(T document)
    Update a document 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> void
    update(T document, Collection<String> fields)
    Update document's specific fields based on a given collection of fields using RecordExistsAction.UPDATE_ONLY policy.

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

    getMappingContext, getSetName
  • Constructor Details

  • Method Details

    • getAerospikeClient

      public com.aerospike.client.IAerospikeClient getAerospikeClient()
      Specified by:
      getAerospikeClient in interface AerospikeOperations
      Returns:
      aerospike client in use.
    • createIndex

      public <T> void createIndex(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType)
      Description copied from interface: AerospikeOperations
      Create an index with the specified name in Aerospike.
      Specified by:
      createIndex in interface AerospikeOperations
      Parameters:
      entityClass - The class to extract the Aerospike set 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> 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: AerospikeOperations
      Create an index with the specified name in Aerospike.
      Specified by:
      createIndex in interface AerospikeOperations
      Parameters:
      entityClass - The class to extract the Aerospike set 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> 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: AerospikeOperations
      Create an index with the specified name in Aerospike.
      Specified by:
      createIndex in interface AerospikeOperations
      Parameters:
      entityClass - The class to extract the Aerospike set 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.
    • deleteIndex

      public <T> void deleteIndex(Class<T> entityClass, String indexName)
      Description copied from interface: AerospikeOperations
      Delete an index with the specified name from Aerospike.
      Specified by:
      deleteIndex in interface AerospikeOperations
      Parameters:
      entityClass - The class to extract the Aerospike set from. Must not be null.
      indexName - The index name. Must not be null.
    • indexExists

      public boolean indexExists(String indexName)
      Description copied from interface: AerospikeOperations
      Checks whether an index with the specified name exists in Aerospike.
      Specified by:
      indexExists in interface AerospikeOperations
      Parameters:
      indexName - The Aerospike index name. Must not be null.
      Returns:
      true if exists
    • save

      public <T> void save(T document)
      Description copied from interface: AerospikeOperations
      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 a new record or update an existing one. If the version is set to zero - new record will be created, creation will fail is 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 - 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".

      Specified by:
      save in interface AerospikeOperations
      Parameters:
      document - The document to save. Must not be null.
    • persist

      public <T> void persist(T document, com.aerospike.client.policy.WritePolicy policy)
      Description copied from interface: AerospikeOperations
      Persist a document using specified WritePolicy.
      Specified by:
      persist in interface AerospikeOperations
      Parameters:
      document - The document to persist. Must not be null.
      policy - The Aerospike write policy for the inner Aerospike put operation. Must not be null.
    • insertAll

      public <T> void insertAll(Collection<? extends T> documents)
      Description copied from interface: AerospikeOperations
      Insert each document of the given documents using single insert operations.
      Specified by:
      insertAll in interface AerospikeOperations
      Parameters:
      documents - The documents to insert. Must not be null.
    • insert

      public <T> void insert(T document)
      Description copied from interface: AerospikeOperations
      Insert a document using RecordExistsAction.CREATE_ONLY policy.

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

      Specified by:
      insert in interface AerospikeOperations
      Parameters:
      document - The document to insert. Must not be null.
    • update

      public <T> void update(T document)
      Description copied from interface: AerospikeOperations
      Update a document 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.

      Specified by:
      update in interface AerospikeOperations
      Parameters:
      document - The document to update. Must not be null.
    • update

      public <T> void update(T document, Collection<String> fields)
      Description copied from interface: AerospikeOperations
      Update document's specific fields based on a given collection of fields using RecordExistsAction.UPDATE_ONLY policy. You can instantiate the document with only the 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 interface AerospikeOperations
      Parameters:
      document - The document to update. Must not be null.
    • delete

      public <T> void delete(Class<T> entityClass)
      Description copied from interface: AerospikeOperations
      Truncate/Delete all the documents in the given entity's set.
      Specified by:
      delete in interface AerospikeOperations
      Parameters:
      entityClass - The class to extract the Aerospike set from. Must not be null.
    • delete

      public <T> boolean delete(Object id, Class<T> entityClass)
      Description copied from interface: AerospikeOperations
      Delete a document by id, set name will be determined by the given entityClass.
      Specified by:
      delete in interface AerospikeOperations
      Parameters:
      id - The id of the document to delete. Must not be null.
      entityClass - The class to extract the Aerospike set from. Must not be null.
      Returns:
      whether the document existed on server before deletion.
    • delete

      public <T> boolean delete(T document)
      Description copied from interface: AerospikeOperations
      Delete a document.
      Specified by:
      delete in interface AerospikeOperations
      Parameters:
      document - The document to delete. Must not be null.
      Returns:
      whether the document existed on server before deletion.
    • exists

      public <T> boolean exists(Object id, Class<T> entityClass)
      Description copied from interface: AerospikeOperations
      Check if a document exists by providing document id and entityClass (set name will be determined by the given entityClass).
      Specified by:
      exists in interface AerospikeOperations
      Parameters:
      id - The id to check if exists. Must not be null.
      entityClass - The class to extract the Aerospike set from. Must not be null.
      Returns:
      whether the document exists.
    • findAll

      public <T> Stream<T> findAll(Class<T> entityClass)
      Description copied from interface: AerospikeOperations
      Find all documents in the given entityClass's set and map them to the given class type.
      Specified by:
      findAll in interface AerospikeOperations
      Parameters:
      entityClass - The class to extract the Aerospike set from and to map the documents to. Must not be null.
      Returns:
      A Stream of matching documents, returned documents will be mapped to entityClass's type.
    • findAll

      public <T, S> Stream<S> findAll(Class<T> entityClass, Class<S> targetClass)
      Description copied from interface: AerospikeOperations
      Find all documents in the given entityClass's set and map them to the given target class type.
      Specified by:
      findAll in interface AerospikeOperations
      Parameters:
      entityClass - The class to extract the Aerospike set from. Must not be null.
      targetClass - The class to map the document to. Must not be null.
      Returns:
      A Stream of matching documents, returned documents will be mapped to targetClass's type.
    • findById

      public <T> T findById(Object id, Class<T> entityClass)
      Description copied from interface: AerospikeOperations
      Find a document by id, set name will be determined by the given entityClass.

      Document will be mapped to the given entityClass.

      Specified by:
      findById in interface AerospikeOperations
      Parameters:
      id - The id of the document to find. Must not be null.
      entityClass - The class to extract the Aerospike set from and to map the document to. Must not be null.
      Returns:
      The document from Aerospike, returned document will be mapped to entityClass's type, if document doesn't exist return null.
    • findById

      public <T, S> S findById(Object id, Class<T> entityClass, Class<S> targetClass)
      Description copied from interface: AerospikeOperations
      Find a document by id, set name will be determined by the given entityClass.

      Document will be mapped to the given entityClass.

      Specified by:
      findById in interface AerospikeOperations
      Parameters:
      id - The id of the document to find. Must not be null.
      entityClass - The class to extract the Aerospike set from. Must not be null.
      targetClass - The class to map the document to. Must not be null.
      Returns:
      The document from Aerospike, returned document will be mapped to targetClass's type, if document doesn't exist return null.
    • findByIds

      public <T> List<T> findByIds(Iterable<?> ids, Class<T> entityClass)
      Description copied from interface: AerospikeOperations
      Find documents by providing multiple ids using a single batch read operation, set name will be determined by the given entityClass.

      Documents will be mapped to the given entityClass.

      Specified by:
      findByIds in interface AerospikeOperations
      Parameters:
      ids - The ids of the documents to find. Must not be null.
      entityClass - The class to extract the Aerospike set from and to map the documents to. Must not be null.
      Returns:
      The documents from Aerospike, returned documents will be mapped to entityClass's type, if no document exists return an empty list.
    • findByIds

      public <T, S> List<S> findByIds(Iterable<?> ids, Class<T> entityClass, Class<S> targetClass)
      Description copied from interface: AerospikeOperations
      Find documents by providing multiple ids using a single batch read operation, set name will be determined by the given entityClass.

      Documents will be mapped to the given targetClass.

      Specified by:
      findByIds in interface AerospikeOperations
      Parameters:
      ids - The ids of the documents to find. Must not be null.
      entityClass - The class to extract the Aerospike set from. Must not be null.
      targetClass - The class to map the document to. Must not be null.
      Returns:
      The documents from Aerospike, returned documents will be mapped to targetClass's type, if no document exists return an empty list.
    • findByIds

      public GroupedEntities findByIds(GroupedKeys groupedKeys)
      Description copied from interface: AerospikeOperations
      Executes a single batch request to get results for several entities.

      Aerospike provides functionality to get documents from different sets in 1 batch request. The methods allow to put grouped keys by entity type as parameter and get result as spring data aerospike entities grouped by entity type.

      Specified by:
      findByIds in interface AerospikeOperations
      Parameters:
      groupedKeys - Must not be null.
      Returns:
      grouped entities.
    • aggregate

      public <T> com.aerospike.client.query.ResultSet aggregate(com.aerospike.client.query.Filter filter, Class<T> entityClass, String module, String function, List<com.aerospike.client.Value> arguments)
      Description copied from interface: AerospikeOperations
      Execute query, apply statement's aggregation function, and return result iterator.
      Specified by:
      aggregate in interface AerospikeOperations
      Parameters:
      filter - The filter to pass to the query.
      entityClass - The class to extract the Aerospike set from. Must not be null.
      module - server package where user defined function resides.
      function - aggregation function name.
      arguments - arguments to pass to function name, if any.
      Returns:
      Result iterator.
    • findAll

      public <T> Stream<T> findAll(Sort sort, long offset, long limit, Class<T> entityClass)
      Description copied from interface: AerospikeOperations
      Find all documents in the given entityClass's set using a provided sort and map them to the given class type.
      Specified by:
      findAll in interface AerospikeOperations
      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 the Aerospike set from and to map the documents to.
      Returns:
      A stream of matching documents, returned documents will be mapped to entityClass's type.
    • findAll

      public <T, S> Stream<S> findAll(Sort sort, long offset, long limit, Class<T> entityClass, Class<S> targetClass)
      Description copied from interface: AerospikeOperations
      Find all documents in the given entityClass's set using a provided sort and map them to the given target class type.
      Specified by:
      findAll in interface AerospikeOperations
      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 the Aerospike set from.
      targetClass - The class to map the document to. Must not be null.
      Returns:
      A stream of matching documents, returned documents will be mapped to targetClass's type.
    • exists

      public <T> boolean exists(Query query, Class<T> entityClass)
    • execute

      public <T> T execute(Supplier<T> supplier)
      Description copied from interface: AerospikeOperations
      Execute operation against underlying store.
      Specified by:
      execute in interface AerospikeOperations
      Parameters:
      supplier - must not be null.
      Returns:
      Execution result.
    • count

      public <T> long count(Query query, Class<T> entityClass)
      Description copied from interface: AerospikeOperations
      Return the amount of documents in query results. Set name will be determined by the given entityClass.
      Specified by:
      count in interface AerospikeOperations
      Parameters:
      query - The query that provides the result set for count.
      entityClass - entityClass The class to extract the Aerospike set from. Must not be null.
      Returns:
      amount of documents that the given query and entity class supplied.
    • find

      public <T> Stream<T> find(Query query, Class<T> entityClass)
      Description copied from interface: AerospikeOperations
      Find documents in the given entityClass's set using a query and map them to the given class type.
      Specified by:
      find in interface AerospikeOperations
      Parameters:
      query - The query to filter results. Must not be null.
      entityClass - The class to extract the Aerospike set from and to map the documents to. Must not be null.
      Returns:
      A Stream of matching documents, returned documents will be mapped to entityClass's type.
    • find

      public <T, S> Stream<S> find(Query query, Class<T> entityClass, Class<S> targetClass)
      Description copied from interface: AerospikeOperations
      Find documents in the given entityClass's set using a query and map them to the given target class type.
      Specified by:
      find in interface AerospikeOperations
      Parameters:
      query - The query to filter results. Must not be null.
      entityClass - The class to extract the Aerospike set from. Must not be null.
      targetClass - The class to map the document to. Must not be null.
      Returns:
      A Stream of matching documents, returned documents will be mapped to targetClass's type.
    • findInRange

      public <T> Stream<T> findInRange(long offset, long limit, Sort sort, Class<T> entityClass)
      Description copied from interface: AerospikeOperations
      Find documents 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 interface AerospikeOperations
      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 the Aerospike set from and to map the documents to. Must not be null.
      Returns:
      A Stream of matching documents, returned documents will be mapped to entityClass's type.
    • findInRange

      public <T, S> Stream<S> findInRange(long offset, long limit, Sort sort, Class<T> entityClass, Class<S> targetClass)
      Description copied from interface: AerospikeOperations
      Find documents 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 interface AerospikeOperations
      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 the Aerospike set from. Must not be null.
      targetClass - The class to map the document to. Must not be null.
      Returns:
      A Stream of matching documents, returned documents will be mapped to targetClass's type.
    • count

      public <T> long count(Class<T> entityClass)
      Description copied from interface: AerospikeOperations
      Return the amount of documents in the given entityClass's Aerospike set.
      Specified by:
      count in interface AerospikeOperations
      Parameters:
      entityClass - The class to extract the Aerospike set from. Must not be null.
      Returns:
      amount of documents in the set (of the given entityClass).
    • count

      public long count(String setName)
      Description copied from interface: AerospikeOperations
      Return the amount of documents in the given Aerospike set.
      Specified by:
      count in interface AerospikeOperations
      Parameters:
      setName - The name of the set to count. Must not be null.
      Returns:
      amount of documents in the given set.
    • prepend

      public <T> T prepend(T document, String fieldName, String value)
      Description copied from interface: AerospikeOperations
      Prepend bin string value to existing document bin value, read the new modified document and map it back the given document class type.
      Specified by:
      prepend in interface AerospikeOperations
      Parameters:
      document - The document to extract the Aerospike set from and to map the documents to. Must not be null.
      fieldName - Bin name to use prepend operation on.
      value - The value to prepend.
      Returns:
      Modified document after prepend operation.
    • prepend

      public <T> T prepend(T document, Map<String,String> values)
      Description copied from interface: AerospikeOperations
      Prepend bin string values to existing document bin values, read the new modified document and map it back the given document class type.
      Specified by:
      prepend in interface AerospikeOperations
      Parameters:
      document - The document to extract the Aerospike set from and to map the documents to. Must not be null.
      values - a Map of bin names and values to prepend. Must not be null.
      Returns:
      Modified document after prepend operations.
    • append

      public <T> T append(T document, Map<String,String> values)
      Description copied from interface: AerospikeOperations
      Append bin string values to existing document bin values, read the new modified document and map it back the given document class type.
      Specified by:
      append in interface AerospikeOperations
      Parameters:
      document - The document to extract the Aerospike set from and to map the documents to. Must not be null.
      values - a Map of bin names and values to append. Must not be null.
      Returns:
      Modified document after append operations.
    • append

      public <T> T append(T document, String binName, String value)
      Description copied from interface: AerospikeOperations
      Append bin string value to existing document bin value, read the new modified document and map it back the given document class type.
      Specified by:
      append in interface AerospikeOperations
      Parameters:
      document - The document to extract the Aerospike set from and to map the documents to. Must not be null.
      binName - Bin name to use append operation on.
      value - The value to append.
      Returns:
      Modified document after append operation.
    • add

      public <T> T add(T document, Map<String,Long> values)
      Description copied from interface: AerospikeOperations
      Add integer/double bin values to existing document bin values, read the new modified document and map it back the given document class type.
      Specified by:
      add in interface AerospikeOperations
      Parameters:
      document - The document to extract the Aerospike set from and to map the documents to. Must not be null.
      values - a Map of bin names and values to add. Must not be null.
      Returns:
      Modified document after add operations.
    • add

      public <T> T add(T document, String binName, long value)
      Description copied from interface: AerospikeOperations
      Add integer/double bin value to existing document bin value, read the new modified document and map it back the given document class type.
      Specified by:
      add in interface AerospikeOperations
      Parameters:
      document - The document to extract the Aerospike set from and to map the documents to. Must not be null.
      binName - Bin name to use add operation on. Must not be null.
      value - The value to add.
      Returns:
      Modified document after add operation.
    • getSetName

      public <T> String getSetName(Class<T> entityClass)
    • getMappingContext

      public MappingContext<?,?> getMappingContext()
    • getNamespace

      public String getNamespace()