Class AerospikeTemplate
- All Implemented Interfaces:
AerospikeOperations
,IndexesCacheRefresher
AerospikeOperations
.- Author:
- Oliver Gierke, Peter Milne, Anastasiia Smirnova, Igor Ermolenko, Roman Terentiev
-
Constructor Summary
ConstructorDescriptionAerospikeTemplate
(com.aerospike.client.IAerospikeClient client, String namespace, MappingAerospikeConverter converter, AerospikeMappingContext mappingContext, AerospikeExceptionTranslator exceptionTranslator, QueryEngine queryEngine, IndexRefresher indexRefresher, ServerVersionSupport serverVersionSupport) -
Method Summary
Modifier and TypeMethodDescription<T> T
Find an existing record matching the document's class and id, add specified value to the record's bin and return the modified record mapped to the document's class.<T> T
Find an existing record matching the document's id and the given set name, add specified value to the record's bin and return the modified record mapped to the document's class.<T> T
Find an existing record matching the document's id and the given set name, add map values to the corresponding bins of the record and return the modified record mapped to the document's class.<T> T
Find an existing record matching the document's class and id, add map values to the corresponding bins of the record and return the modified record mapped to the document's class.<T> 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.com.aerospike.client.query.ResultSet
aggregate
(com.aerospike.client.query.Filter filter, String setName, String module, String function, List<com.aerospike.client.Value> arguments) Execute query within the given set, apply statement's aggregation function, and return result iterator.<T> T
Find an existing record matching the document's class and id, append specified value to the record's bin and return the modified record mapped to the document's class.<T> T
Find an existing record matching the document's id and the given set name, append specified value to the record's bin and return the modified record mapped to the document's class.<T> T
Find an existing record matching the document's id and the given set name, append map values to the corresponding bins of the record and return the modified record mapped to the document's class.<T> T
Find an existing record matching the document's class and id, append map values to the corresponding bins of the record and return the modified record mapped to the document's class.<T> long
Return the amount of records in the set determined by the given entityClass.long
Return the amount of records in the given Aerospike set.<T> long
Return the amount of records in query results.long
Return the amount of records in query results within the given set.<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.void
createIndex
(String setName, String indexName, String binName, com.aerospike.client.query.IndexType indexType) Create an index with the specified name in Aerospike.void
createIndex
(String setName, 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.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) Create an index with the specified name in Aerospike.<T> void
Deprecated, for removal: This API element is subject to removal in a future version.<T> boolean
Deprecated, for removal: This API element is subject to removal in a future version.<T> boolean
delete
(T document) Delete a record using the document's id.<T> boolean
Delete a record within the given set using the document's id.<T> void
Truncate/Delete all records in the set determined by the given entity class.<T> void
Truncate/Delete all documents in the given set.<T> void
Delete multiple records in one batch request.<T> void
Delete multiple records within the given set (overrides the default set associated with the documents) in one batch request.void
Truncate/Delete all documents in the given set.void
Truncate/Delete all documents in the given set.<T> boolean
deleteById
(Object id, Class<T> entityClass) Delete a record by id, set name will be determined by the given entityClass.boolean
deleteById
(Object id, String setName) Delete a record by id within the given set.<T> void
deleteByIds
(Iterable<?> ids, Class<T> entityClass) Delete records by ids using a single batch delete operation, set name will be determined by the given entityClass.void
deleteByIds
(Iterable<?> ids, String setName) Delete records by ids within the given set using a single batch delete operation.void
deleteByIds
(GroupedKeys groupedKeys) Perform a single batch delete operation for records from different sets.<T> void
deleteIndex
(Class<T> entityClass, String indexName) Delete an index with the specified name in Aerospike.void
deleteIndex
(String setName, String indexName) Delete an index with the specified name within the given set in Aerospike.<T> T
Execute an operation against underlying store.<T> boolean
Check by id if a record exists within the set associated with the given entityClass.boolean
Check by id if a record exists within the given set name.<T> boolean
existsByQuery
(Query query, Class<T> entityClass) Check using a query if any matching records exist within the set associated with the given entityClass.<T> boolean
existsByQuery
(Query query, Class<T> entityClass, String setName) Check using a query if any matching records exist within the given set.<T> Stream
<T> Find records in the given entityClass's set using a query and map them to the given class type.<T,
S> Stream <S> Find records in the given entityClass's set using a query and map them to the given target class type.<T> Stream
<T> Find records in the given set using a query and map them to the given target class type.<T> Stream
<T> Find all records in the given entityClass's set and map them to the given class type.<T,
S> Stream <S> Find all records in the given entityClass's set and map them to the given target class type.<T> Stream
<T> Find all records in the given set and map them to the given class type.<T> Stream
<T> Find all records in the given entityClass's set using a provided sort and map them to the given class type.<T,
S> Stream <S> Find all records in the given entityClass's set using a provided sort and map them to the given target class type.<T> Stream
<T> Find all records in the given set using a provided sort and map them to the given target class type.<T> T
Find a record by id, set name will be determined by the given entityClass.<T,
S> S Find a record by id, set name will be determined by the given entityClass.<T,
S> S Find a record by id within the given set.<T> T
Find a record by id within the given set.<T> List
<T> Find records by ids using a single batch read operation, set name will be determined by the given entityClass.<T,
S> List <S> Find records by ids using a single batch read operation, set name will be determined by the given entityClass.<T,
S> List <S> Find records by ids within the given set using a single batch read operation.<T> List
<T> Find records by ids within the given set using a single batch read operation.findByIds
(GroupedKeys groupedKeys) Execute a single batch request to find several records, possibly from different sets.<T,
S> List <?> findByIdsUsingQuery
(Collection<?> ids, Class<T> entityClass, Class<S> targetClass, String setName, Query query) Find records by ids within the given set.<T,
S> List <?> findByIdsUsingQuery
(Collection<?> ids, Class<T> entityClass, Class<S> targetClass, Query query) Find records by ids and a query, set name will be determined by the given entityClass.<T,
S> Object 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> Object 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> Stream
<T> findInRange
(long offset, long limit, Sort sort, Class<T> entityClass) 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> Stream <S> findInRange
(long offset, long limit, Sort sort, Class<T> entityClass, Class<S> targetClass) 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> Stream
<T> findInRange
(long offset, long limit, Sort sort, Class<T> targetClass, String setName) Find records in the given set using a range (offset, limit) and a sort and map them to the given target class type.<T,
S> Stream <S> findUsingQueryWithoutPostProcessing
(Class<T> entityClass, Class<S> targetClass, Query query) Find records in the given entityClass set using a query and map them to the given target class type.com.aerospike.client.IAerospikeClient
<T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData
<T> getBatchWriteForDelete
(T document, String setName) <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData
<T> getBatchWriteForInsert
(T document, String setName) <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData
<T> getBatchWriteForSave
(T document, String setName) <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData
<T> getBatchWriteForUpdate
(T document, String setName) MappingContext
<?, ?> long
<T> String
getSetName
(Class<T> entityClass) <T> String
getSetName
(T document) boolean
indexExists
(String indexName) Check whether an index with the specified name exists in Aerospike.<T> void
insert
(T document) Insert a document usingRecordExistsAction.CREATE_ONLY
policy.<T> void
Insert a document within the given set (overrides the set associated with the document) usingRecordExistsAction.CREATE_ONLY
policy.<T> void
Insert multiple documents in one batch request.<T> void
Insert multiple documents within the given set (overrides the set associated with the document) in one batch request.<T> void
persist
(T document, com.aerospike.client.policy.WritePolicy policy) Persist a document using specified WritePolicy.<T> void
Persist a document within the given set (overrides the default set associated with the document) using specified WritePolicy.<T> T
Find an existing record matching the document's class and id, prepend specified value to the record's bin and return the modified record mapped to the document's class.<T> T
Find an existing record matching the document's id and the given set name, prepend specified value to the record's bin and return the modified record mapped to the document's class.<T> T
Find an existing record matching the document's id and the given set name, prepend map values to the corresponding bins of the record and return the modified record mapped to the document's class.<T> T
Find an existing record matching the document's class and id, prepend map values to the corresponding bins of the record and return the modified record mapped to the document's class.void
<T> void
save
(T document) Save a document.<T> void
Save a document within the given set (overrides the set associated with the document)<T> void
Save multiple documents in one batch request.<T> void
Save multiple documents within the given set (overrides the default set associated with the documents) in one batch request.<T> void
update
(T document) Update a record usingRecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document if it is present.<T> void
Update a record with the given set (overrides the set associated with the document) usingRecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document if it is present.<T> void
update
(T document, String setName, Collection<String> fields) Update specific fields of a record based on the given collection of fields with the given set (overrides the set associated with the document) usingRecordExistsAction.UPDATE_ONLY
policy.<T> void
update
(T document, Collection<String> fields) Update specific fields of a record based on the given collection of fields usingRecordExistsAction.UPDATE_ONLY
policy.<T> void
Update multiple records in one batch request.<T> void
Update multiple records within the given set (overrides the default set associated with the documents) in one batch request.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.aerospike.core.AerospikeOperations
getAerospikeConverter, getMappingContext, getSetName, getSetName
-
Constructor Details
-
AerospikeTemplate
public AerospikeTemplate(com.aerospike.client.IAerospikeClient client, String namespace, MappingAerospikeConverter converter, AerospikeMappingContext mappingContext, AerospikeExceptionTranslator exceptionTranslator, QueryEngine queryEngine, IndexRefresher indexRefresher, ServerVersionSupport serverVersionSupport)
-
-
Method Details
-
getAerospikeClient
public com.aerospike.client.IAerospikeClient getAerospikeClient()- Specified by:
getAerospikeClient
in interfaceAerospikeOperations
- Returns:
- Aerospike client in use.
-
getQueryMaxRecords
public long getQueryMaxRecords()- Specified by:
getQueryMaxRecords
in interfaceAerospikeOperations
- Returns:
- Value of configuration parameter
invalid reference
AerospikeDataSettings#getQueryMaxRecords()
-
refreshIndexesCache
public void refreshIndexesCache()- Specified by:
refreshIndexesCache
in interfaceIndexesCacheRefresher
-
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, a new record will be created, creation will fail if such record already exists. If the version is greater than zero, existing record will be updated with
RecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document. Document's 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 toRecordExistsAction.REPLACE
). This means that when such record does not exist it will be created, otherwise updated (an "upsert").- Specified by:
save
in interfaceAerospikeOperations
- Parameters:
document
- The document to be saved. Must not be null.
-
save
Description copied from interface:AerospikeOperations
Save a document within the given set (overrides the set associated with the 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, a new record will be created, creation will fail if such record already exists. If the version is greater than zero, existing record will be updated with
RecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document. Document's 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 toRecordExistsAction.REPLACE
). This means that when such record does not exist it will be created, otherwise updated (an "upsert").- Specified by:
save
in interfaceAerospikeOperations
- Parameters:
document
- The document to be saved. Must not be null.setName
- Set name to override the set associated with the document.
-
saveAll
Description copied from interface:AerospikeOperations
Save multiple documents in one batch request. The policies are analogous toAerospikeOperations.save(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
This operation requires Server version 6.0+.
- Specified by:
saveAll
in interfaceAerospikeOperations
- Parameters:
documents
- The documents to be saved. Must not be null.
-
saveAll
Description copied from interface:AerospikeOperations
Save multiple documents within the given set (overrides the default set associated with the documents) in one batch request. The policies are analogous toAerospikeOperations.save(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
This operation requires Server version 6.0+.
- Specified by:
saveAll
in interfaceAerospikeOperations
- Parameters:
documents
- The documents to be saved. Must not be null.setName
- Set name to override the default set associated with the documents.
-
insert
public <T> void insert(T document) Description copied from interface:AerospikeOperations
Insert a document usingRecordExistsAction.CREATE_ONLY
policy.If the document has version property it will be updated with the server's version after successful operation.
- Specified by:
insert
in interfaceAerospikeOperations
- Parameters:
document
- The document to be inserted. Must not be null.
-
insert
Description copied from interface:AerospikeOperations
Insert a document within the given set (overrides the set associated with the document) usingRecordExistsAction.CREATE_ONLY
policy.If document has version property, it will be updated with the server's version after successful operation.
- Specified by:
insert
in interfaceAerospikeOperations
- Parameters:
document
- The document to be inserted. Must not be null.setName
- Set name to override the set associated with the document.
-
insertAll
Description copied from interface:AerospikeOperations
Insert multiple documents in one batch request. The policies are analogous toAerospikeOperations.insert(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
This operation requires Server version 6.0+.
- Specified by:
insertAll
in interfaceAerospikeOperations
- Parameters:
documents
- Documents to be inserted. Must not be null.
-
insertAll
Description copied from interface:AerospikeOperations
Insert multiple documents within the given set (overrides the set associated with the document) in one batch request. The policies are analogous toAerospikeOperations.insert(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
This operation requires Server version 6.0+.
- Specified by:
insertAll
in interfaceAerospikeOperations
- Parameters:
documents
- Documents to be inserted. Must not be null.setName
- Set name to override the set associated with the document.
-
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 interfaceAerospikeOperations
- Parameters:
document
- The document to be persisted. Must not be null.policy
- The Aerospike write policy for the inner Aerospike put operation. Must not be null.
-
persist
Description copied from interface:AerospikeOperations
Persist a document within the given set (overrides the default set associated with the document) using specified WritePolicy.- Specified by:
persist
in interfaceAerospikeOperations
- Parameters:
document
- The document to be persisted. Must not be null.policy
- The Aerospike write policy for the inner Aerospike put operation. Must not be null.setName
- Set name to override the set associated with the document.
-
update
public <T> void update(T document) Description copied from interface:AerospikeOperations
Update a record usingRecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document if it is present.If document has version property it will be updated with the server's version after successful operation.
- Specified by:
update
in interfaceAerospikeOperations
- Parameters:
document
- The document that identifies the record to be updated. Must not be null.
-
update
Description copied from interface:AerospikeOperations
Update a record with the given set (overrides the set associated with the document) usingRecordExistsAction.UPDATE_ONLY
policy combined with removing bins at first (analogous toRecordExistsAction.REPLACE_ONLY
) taking into consideration the version property of the document if it is present.If document has version property it will be updated with the server's version after successful operation.
- Specified by:
update
in interfaceAerospikeOperations
- Parameters:
document
- The document that identifies the record to be updated. Must not be null.setName
- Set name to override the set associated with the document.
-
update
Description copied from interface:AerospikeOperations
Update specific fields of a record based on the given collection of fields usingRecordExistsAction.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 interfaceAerospikeOperations
- Parameters:
document
- The document that identifies the record to be updated. Must not be null.fields
- Specific fields to update.
-
update
Description copied from interface:AerospikeOperations
Update specific fields of a record based on the given collection of fields with the given set (overrides the set associated with the document) usingRecordExistsAction.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 interfaceAerospikeOperations
- Parameters:
document
- The document that identifies the record to be updated. Must not be null.setName
- Set name to override the set associated with the document.fields
- Specific fields to update.
-
updateAll
Description copied from interface:AerospikeOperations
Update multiple records in one batch request. The policies are analogous toAerospikeOperations.update(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
This operation requires Server version 6.0+.
- Specified by:
updateAll
in interfaceAerospikeOperations
- Parameters:
documents
- The documents that identify the records to be updated. Must not be null.
-
updateAll
Description copied from interface:AerospikeOperations
Update multiple records within the given set (overrides the default set associated with the documents) in one batch request. The policies are analogous toAerospikeOperations.update(Object)
.The order of returned results is preserved. The execution order is NOT preserved.
This operation requires Server version 6.0+.
- Specified by:
updateAll
in interfaceAerospikeOperations
- Parameters:
documents
- The documents that identify the records to be updated. Must not be null.setName
- Set name to override the set associated with the document.
-
delete
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AerospikeOperations
Truncate/Delete all records in the set determined by the given entityClass.- Specified by:
delete
in interfaceAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.
-
delete
@Deprecated(since="4.6.0", forRemoval=true) public <T> boolean delete(Object id, Class<T> entityClass) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AerospikeOperations
Delete a record by id, set name will be determined by the given entityClass.- Specified by:
delete
in interfaceAerospikeOperations
- Parameters:
id
- The id of the record to delete. Must not be null.entityClass
- The class to extract set name from. Must not be null.- Returns:
- whether the record existed on server before deletion.
-
delete
public <T> boolean delete(T document) Description copied from interface:AerospikeOperations
Delete a record using the document's id.If the document has version property it will be compared with the corresponding record's version on server.
- Specified by:
delete
in interfaceAerospikeOperations
- Parameters:
document
- The document to get set name and id from. Must not be null.- Returns:
- Whether the record existed on server before deletion.
-
delete
Description copied from interface:AerospikeOperations
Delete a record within the given set using the document's id.If the document has version property it will be compared with the corresponding record's version on server.
- Specified by:
delete
in interfaceAerospikeOperations
- Parameters:
document
- The document to get id from. Must not be null.setName
- Set name to use.- Returns:
- Whether the record existed on server before deletion.
-
deleteById
Description copied from interface:AerospikeOperations
Delete a record by id, set name will be determined by the given entityClass.If the document has version property it is not compared with the corresponding record's version on server.
- Specified by:
deleteById
in interfaceAerospikeOperations
- Parameters:
id
- The id of the record to be deleted. Must not be null.entityClass
- The class to extract set name from. Must not be null.- Returns:
- Whether the record existed on server before deletion.
-
deleteById
Description copied from interface:AerospikeOperations
Delete a record by id within the given set.If the document has version property it is not compared with the corresponding record's version on server.
- Specified by:
deleteById
in interfaceAerospikeOperations
- Parameters:
id
- The id of the record to be deleted. Must not be null.setName
- Set name to use.- Returns:
- Whether the record existed on server before deletion.
-
deleteAll
Description copied from interface:AerospikeOperations
Delete multiple records in one batch request. The policies are analogous toAerospikeOperations.delete(Object)
.The execution order is NOT preserved.
This operation requires Server version 6.0+.
- Specified by:
deleteAll
in interfaceAerospikeOperations
- Parameters:
documents
- The documents to be deleted. Must not be null.
-
deleteAll
Description copied from interface:AerospikeOperations
Delete multiple records within the given set (overrides the default set associated with the documents) in one batch request. The policies are analogous toAerospikeOperations.delete(Object)
.The execution order is NOT preserved.
This operation requires Server version 6.0+.
- Specified by:
deleteAll
in interfaceAerospikeOperations
- Parameters:
documents
- The documents to be deleted. Must not be null.setName
- Set name to override the default set associated with the documents.
-
deleteByIds
Description copied from interface:AerospikeOperations
Delete records by ids using a single batch delete operation, set name will be determined by the given entityClass. The policies are analogous toAerospikeOperations.deleteById(Object, Class)
.This operation requires Server version 6.0+.
- Specified by:
deleteByIds
in interfaceAerospikeOperations
- Parameters:
ids
- The ids of the records to be deleted. Must not be null.entityClass
- The class to extract set name from. Must not be null.
-
deleteByIds
Description copied from interface:AerospikeOperations
Delete records by ids within the given set using a single batch delete operation. The policies are analogous toAerospikeOperations.deleteById(Object, String)
.This operation requires Server version 6.0+.
- Specified by:
deleteByIds
in interfaceAerospikeOperations
- Parameters:
ids
- The ids of the records to be deleted. Must not be null.setName
- Set name to use.
-
deleteByIds
Description copied from interface:AerospikeOperations
Perform a single batch delete operation for records from different sets.Records' versions on server are not checked.
This operation requires Server 6.0+.
- Specified by:
deleteByIds
in interfaceAerospikeOperations
- Parameters:
groupedKeys
- Keys grouped by document type. Must not be null, groupedKeys.getEntitiesKeys() must not be null.
-
deleteAll
Description copied from interface:AerospikeOperations
Truncate/Delete all records in the set determined by the given entity class.- Specified by:
deleteAll
in interfaceAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.
-
deleteAll
Description copied from interface:AerospikeOperations
Truncate/Delete all documents in the given set.- Specified by:
deleteAll
in interfaceAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.beforeLastUpdate
- Delete records before the specified time (must be earlier than the current time at millisecond resolution).
-
deleteAll
Description copied from interface:AerospikeOperations
Truncate/Delete all documents in the given set.- Specified by:
deleteAll
in interfaceAerospikeOperations
- Parameters:
setName
- Set name to truncate/delete all records in.
-
deleteAll
Description copied from interface:AerospikeOperations
Truncate/Delete all documents in the given set.- Specified by:
deleteAll
in interfaceAerospikeOperations
- Parameters:
setName
- Set name to truncate/delete all records in.beforeLastUpdate
- Delete records before the specified time (must be earlier than the current time at millisecond resolution).
-
add
Description copied from interface:AerospikeOperations
Find an existing record matching the document's class and id, add map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
add
in interfaceAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the record to. Must not be null.values
- The Map of bin names and values to add. Must not be null.- Returns:
- Modified record mapped to the document's class.
-
add
Description copied from interface:AerospikeOperations
Find an existing record matching the document's id and the given set name, add map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
add
in interfaceAerospikeOperations
- Parameters:
document
- The document to get id from and to map the record 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:
- Modified record mapped to the document's class.
-
add
Description copied from interface:AerospikeOperations
Find an existing record matching the document's class and id, add specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
add
in interfaceAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the record to. Must not be null.binName
- Bin name to use add operation on. Must not be null.value
- The value to add.- Returns:
- Modified record mapped to the document's class.
-
add
Description copied from interface:AerospikeOperations
Find an existing record matching the document's id and the given set name, add specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
add
in interfaceAerospikeOperations
- Parameters:
document
- The document to get id from and to map the record 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:
- Modified record mapped to the document's class.
-
append
Description copied from interface:AerospikeOperations
Find an existing record matching the document's class and id, append map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
append
in interfaceAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the record to. Must not be null.values
- The Map of bin names and values to append. Must not be null.- Returns:
- Modified record mapped to the document's class.
-
append
Description copied from interface:AerospikeOperations
Find an existing record matching the document's id and the given set name, append map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
append
in interfaceAerospikeOperations
- Parameters:
document
- The document to get id from and to map the record 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:
- Modified record mapped to the document's class.
-
append
Description copied from interface:AerospikeOperations
Find an existing record matching the document's class and id, append specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
append
in interfaceAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the record to. Must not be null.binName
- Bin name to use append operation on.value
- The value to append.- Returns:
- Modified record mapped to the document's class.
-
append
Description copied from interface:AerospikeOperations
Find an existing record matching the document's id and the given set name, append specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
append
in interfaceAerospikeOperations
- Parameters:
document
- The document to get id from and to map the record to. Must not be null.setName
- Set name to use.binName
- Bin name to use append operation on.value
- The value to append.- Returns:
- Modified record mapped to the document's class.
-
prepend
Description copied from interface:AerospikeOperations
Find an existing record matching the document's class and id, prepend specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
prepend
in interfaceAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the record to. Must not be null.fieldName
- Bin name to use prepend operation on.value
- The value to prepend.- Returns:
- Modified record mapped to the document's class.
-
prepend
Description copied from interface:AerospikeOperations
Find an existing record matching the document's id and the given set name, prepend specified value to the record's bin and return the modified record mapped to the document's class.- Specified by:
prepend
in interfaceAerospikeOperations
- Parameters:
document
- The document to get id from and to map the record to. Must not be null.setName
- Set name to use.fieldName
- Bin name to use prepend operation on.value
- The value to prepend.- Returns:
- Modified record mapped to the document's class.
-
prepend
Description copied from interface:AerospikeOperations
Find an existing record matching the document's class and id, prepend map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
prepend
in interfaceAerospikeOperations
- Parameters:
document
- The document to get set name and id from and to map the record to. Must not be null.values
- The Map of bin names and values to prepend. Must not be null.- Returns:
- Modified record mapped to the document's class.
-
prepend
Description copied from interface:AerospikeOperations
Find an existing record matching the document's id and the given set name, prepend map values to the corresponding bins of the record and return the modified record mapped to the document's class.- Specified by:
prepend
in interfaceAerospikeOperations
- Parameters:
document
- The document to get id from and to map the record 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:
- Modified record mapped to the document's class.
-
execute
Description copied from interface:AerospikeOperations
Execute an operation against underlying store.- Specified by:
execute
in interfaceAerospikeOperations
- Parameters:
supplier
- must not be null.- Returns:
- The resulting document.
-
findById
Description copied from interface:AerospikeOperations
Find a record by id, set name will be determined by the given entityClass.The matching record will be mapped to the given entityClass.
- Specified by:
findById
in interfaceAerospikeOperations
- 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 record to. Must not be null.- Returns:
- The document mapped to entityClass's type or null if nothing is found
-
findById
Description copied from interface:AerospikeOperations
Find a record by id within the given set.The matching record will be mapped to the given entityClass.
- Specified by:
findById
in interfaceAerospikeOperations
- 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 as expiration). Must not be null.setName
- Set name to find the document from.- Returns:
- The record mapped to entityClass's type or null if document does not exist
-
findById
Description copied from interface:AerospikeOperations
Find a record by id, set name will be determined by the given entityClass.The matching record will be mapped to the given entityClass.
- Specified by:
findById
in interfaceAerospikeOperations
- 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:
- The record mapped to targetClass's type or null if document doesn't exist.
-
findById
Description copied from interface:AerospikeOperations
Find a record by id within the given set.The matching record will be mapped to the given entityClass.
- Specified by:
findById
in interfaceAerospikeOperations
- Parameters:
id
- The id of the record to find. Must not be null.entityClass
- The class to get entity properties from (such as expiration). Must not be null.targetClass
- The class to map the record to. Must not be null.setName
- Set name to find the document from.- Returns:
- The record mapped to targetClass's type or null if document doesn't exist.
-
findByIds
Description copied from interface:AerospikeOperations
Find records by ids using a single batch read operation, set name will be determined by the given entityClass.The records will be mapped to the given entityClass.
- Specified by:
findByIds
in interfaceAerospikeOperations
- 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 records to. Must not be null.- Returns:
- The matching records mapped to entityClass's type, if no document exists, an empty list is returned.
-
findByIds
Description copied from interface:AerospikeOperations
Find records by ids within the given set using a single batch read operation.The records will be mapped to the given entityClass.
- Specified by:
findByIds
in interfaceAerospikeOperations
- Parameters:
ids
- The ids of the documents to find. Must not be null.entityClass
- The class to map the records to. Must not be null.setName
- Set name to use.- Returns:
- The matching records mapped to entityClass's type or an empty list if nothing found.
-
findByIds
Description copied from interface:AerospikeOperations
Find records by ids using a single batch read operation, set name will be determined by the given entityClass.The records will be mapped to the given targetClass.
- Specified by:
findByIds
in interfaceAerospikeOperations
- 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. Must not be null.- Returns:
- The matching records mapped to targetClass's type or an empty list if nothing found.
-
findByIds
public <T,S> List<S> findByIds(Iterable<?> ids, Class<T> entityClass, Class<S> targetClass, String setName) Description copied from interface:AerospikeOperations
Find records by ids within the given set using a single batch read operation.The records will be mapped to the given targetClass.
- Specified by:
findByIds
in interfaceAerospikeOperations
- Parameters:
ids
- The ids of the documents to find. Must not be null.entityClass
- The class to get entity properties from (such as expiration). Must not be null.targetClass
- The class to map the record to. Must not be null.setName
- Set name to use.- Returns:
- The matching records mapped to targetClass's type or an empty list if nothing found.
-
findByIds
Description copied from interface:AerospikeOperations
Execute a single batch request to find several records, possibly from different sets.Aerospike provides functionality to get records from different sets in 1 batch request. This method receives keys grouped by document type as a parameter and returns Aerospike records mapped to documents grouped by type.
- Specified by:
findByIds
in interfaceAerospikeOperations
- Parameters:
groupedKeys
- Keys grouped by document type. Must not be null, groupedKeys.getEntitiesKeys() must not be null.- Returns:
- grouped documents.
-
findByIdUsingQuery
public <T,S> Object findByIdUsingQuery(Object id, Class<T> entityClass, Class<S> targetClass, Query query) Description copied from interface:AerospikeOperations
Find a record by id using a query, set name will be determined by the given entityClass.The record will be mapped to the given targetClass.
- Specified by:
findByIdUsingQuery
in interfaceAerospikeOperations
- Parameters:
id
- The id of the record to find. Must not be null.entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the record to.query
- TheQuery
to filter results. Optional argument (null if no filtering required).- Returns:
- The matching record mapped to targetClass's type.
-
findByIdUsingQuery
public <T,S> Object findByIdUsingQuery(Object id, Class<T> entityClass, Class<S> targetClass, String setName, Query query) Description copied from interface:AerospikeOperations
Find a record by id within the given set using a query.The record will be mapped to the given targetClass.
- Specified by:
findByIdUsingQuery
in interfaceAerospikeOperations
- Parameters:
id
- The id of the record to find. Must not be null.entityClass
- The class to get the entity properties from (such as expiration). Must not be null.targetClass
- The class to map the record to.setName
- Set name to use.query
- TheQuery
to filter results. Optional argument (null if no filtering required).- Returns:
- The matching record mapped to targetClass's type.
-
findByIdsUsingQuery
public <T,S> List<?> findByIdsUsingQuery(Collection<?> ids, Class<T> entityClass, Class<S> targetClass, Query query) Description copied from interface:AerospikeOperations
Find records by ids and a query, set name will be determined by the given entityClass.The records will be mapped to the given targetClass.
- Specified by:
findByIdsUsingQuery
in interfaceAerospikeOperations
- Parameters:
ids
- The ids of the documents to find. Must not be null.entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the record to.query
- TheQuery
to filter results. Optional argument (null if no filtering required).- Returns:
- The matching records mapped to targetClass's type if provided (otherwise to entityClass's type), or an empty list if no documents found.
-
findByIdsUsingQuery
public <T,S> List<?> findByIdsUsingQuery(Collection<?> ids, Class<T> entityClass, Class<S> targetClass, String setName, Query query) Description copied from interface:AerospikeOperations
Find records by ids within the given set.The records will be mapped to the given targetClass.
- Specified by:
findByIdsUsingQuery
in interfaceAerospikeOperations
- Parameters:
ids
- The ids of the documents to find. Must not be null.entityClass
- The class to get the entity properties from (such as expiration). Must not be null.targetClass
- The class to map the record to.setName
- Set name to use.query
- TheQuery
to filter results. Optional argument (null if no filtering required).- Returns:
- The matching records mapped to targetClass's type if provided (otherwise to entityClass's type), or an empty list if no documents found.
-
find
Description copied from interface:AerospikeOperations
Find records in the given entityClass's set using a query and map them to the given class type.- Specified by:
find
in interfaceAerospikeOperations
- Parameters:
query
- TheQuery
to filter results. Must not be null.entityClass
- The class to extract set name from and to map the records to. Must not be null.- Returns:
- A Stream of matching records mapped to entityClass type.
-
find
Description copied from interface:AerospikeOperations
Find records in the given entityClass's set using a query and map them to the given target class type.- Specified by:
find
in interfaceAerospikeOperations
- Parameters:
query
- TheQuery
to filter results. Must not be null.entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the record to. Must not be null.- Returns:
- A Stream of matching records mapped to targetClass type.
-
find
Description copied from interface:AerospikeOperations
Find records in the given set using a query and map them to the given target class type.- Specified by:
find
in interfaceAerospikeOperations
- Parameters:
query
- TheQuery
to filter results. Must not be null.targetClass
- The class to map the record to. Must not be null.setName
- Set name to use.- Returns:
- A Stream of matching records mapped to targetClass type.
-
findAll
Description copied from interface:AerospikeOperations
Find all records in the given entityClass's set and map them to the given class type.- Specified by:
findAll
in interfaceAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from and to map the records to. Must not be null.- Returns:
- A Stream of matching records mapped to entityClass type.
-
findAll
Description copied from interface:AerospikeOperations
Find all records in the given entityClass's set and map them to the given target class type.- Specified by:
findAll
in interfaceAerospikeOperations
- 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 Stream of matching records mapped to targetClass type.
-
findAll
Description copied from interface:AerospikeOperations
Find all records in the given set and map them to the given class type.- Specified by:
findAll
in interfaceAerospikeOperations
- Parameters:
targetClass
- The class to map the records to. Must not be null.setName
- Set name to use.- Returns:
- A Stream of matching records mapped to entityClass type.
-
findAll
Description copied from interface:AerospikeOperations
Find all records in the given entityClass's set using a provided sort and map them to the given class type.- Specified by:
findAll
in interfaceAerospikeOperations
- 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 records to.- Returns:
- A Stream of matching records mapped to entityClass 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 records in the given entityClass's set using a provided sort and map them to the given target class type.- Specified by:
findAll
in interfaceAerospikeOperations
- 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 record to. Must not be null.- Returns:
- A Stream of matching records mapped to targetClass type.
-
findAll
public <T> Stream<T> findAll(Sort sort, long offset, long limit, Class<T> targetClass, String setName) Description copied from interface:AerospikeOperations
Find all records in the given set using a provided sort and map them to the given target class type.- Specified by:
findAll
in interfaceAerospikeOperations
- 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 record to. Must not be null.setName
- Set name to use.- Returns:
- A Stream of matching records mapped to targetClass type.
-
findUsingQueryWithoutPostProcessing
public <T,S> Stream<S> findUsingQueryWithoutPostProcessing(Class<T> entityClass, Class<S> targetClass, Query query) Description copied from interface:AerospikeOperations
Find records in the given entityClass set using a query and map them to the given target class type. If the query has pagination and/or sorting, post-processing must be applied separately.- Specified by:
findUsingQueryWithoutPostProcessing
in interfaceAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.targetClass
- The class to map the records to.query
- TheQuery
to filter results.- Returns:
- A Stream of all matching records (regardless of pagination/sorting) mapped to targetClass type.
-
findInRange
Description copied from interface:AerospikeOperations
Find records in the given entityClass's set using a range (offset, limit) and a sort and map them to the given class type.- Specified by:
findInRange
in interfaceAerospikeOperations
- 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 records to. Must not be null.- Returns:
- A Stream of matching records mapped to entityClass 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 records in the given entityClass's set using a range (offset, limit) and a sort and map them to the given target class type.- Specified by:
findInRange
in interfaceAerospikeOperations
- 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 Stream of matching records mapped to targetClass type.
-
findInRange
public <T> Stream<T> findInRange(long offset, long limit, Sort sort, Class<T> targetClass, String setName) Description copied from interface:AerospikeOperations
Find records in the given set using a range (offset, limit) and a sort and map them to the given target class type.- Specified by:
findInRange
in interfaceAerospikeOperations
- 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.targetClass
- The class to map the record to. Must not be null.setName
- Set name to use.- Returns:
- A Stream of matching records mapped to targetClass type.
-
exists
Description copied from interface:AerospikeOperations
Check by id if a record exists within the set associated with the given entityClass.- Specified by:
exists
in interfaceAerospikeOperations
- 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:
- whether the matching record exists.
-
exists
Description copied from interface:AerospikeOperations
Check by id if a record exists within the given set name.- Specified by:
exists
in interfaceAerospikeOperations
- Parameters:
id
- The id to check for record existence. Must not be null.setName
- Set name to use.- Returns:
- whether the matching record exists.
-
existsByQuery
Description copied from interface:AerospikeOperations
Check using a query if any matching records exist within the set associated with the given entityClass.- Specified by:
existsByQuery
in interfaceAerospikeOperations
- Parameters:
query
- The query to check if any matching records exist. Must not be null.entityClass
- The class to extract set name from. Must not be null.- Returns:
- whether any matching records exist.
-
existsByQuery
Description copied from interface:AerospikeOperations
Check using a query if any matching records exist within the given set.- Specified by:
existsByQuery
in interfaceAerospikeOperations
- 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:
- whether any matching records exist.
-
count
Description copied from interface:AerospikeOperations
Return the amount of records in the set determined by the given entityClass.- Specified by:
count
in interfaceAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.- Returns:
- amount of records in the set of the given entityClass.
-
count
Description copied from interface:AerospikeOperations
Return the amount of records in the given Aerospike set.- Specified by:
count
in interfaceAerospikeOperations
- Parameters:
setName
- The name of the set to count. Must not be null.- Returns:
- amount of records in the given set.
-
count
Description copied from interface:AerospikeOperations
Return the amount of records in query results. Set name will be determined by the given entityClass.- Specified by:
count
in interfaceAerospikeOperations
- Parameters:
query
- The query that provides the result set for count.entityClass
- The class to extract set name from. Must not be null.- Returns:
- amount of records matching the given query and entity class.
-
count
Description copied from interface:AerospikeOperations
Return the amount of records in query results within the given set.- Specified by:
count
in interfaceAerospikeOperations
- Parameters:
query
- The query that provides the result set for count.setName
- Set name to use.- Returns:
- amount of documents matching the given query and set.
-
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 interfaceAerospikeOperations
- Parameters:
filter
- The filter to pass to the query.entityClass
- The class to extract set name 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.
-
aggregate
public com.aerospike.client.query.ResultSet aggregate(com.aerospike.client.query.Filter filter, String setName, String module, String function, List<com.aerospike.client.Value> arguments) Description copied from interface:AerospikeOperations
Execute query within the given set, apply statement's aggregation function, and return result iterator.- Specified by:
aggregate
in interfaceAerospikeOperations
- Parameters:
filter
- The filter to pass to the query.setName
- Set name to use.module
- server package where user defined function resides.function
- aggregation function name.arguments
- arguments to pass to function name, if any.- Returns:
- Result iterator.
-
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 interfaceAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.indexName
- The index name. Must not be null.binName
- The bin name to create the index on. Must not be null.indexType
- The type of the index. Must not be null.
-
createIndex
public <T> 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 interfaceAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.indexName
- The index name. Must not be null.binName
- The bin name to create the index on. Must not be null.indexType
- The type of the index. Must not be null.indexCollectionType
- The collection type of the index. Must not be null.
-
createIndex
public <T> 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 interfaceAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.indexName
- The index name. Must not be null.binName
- The bin name to create the index on. Must not be null.indexType
- The type of the index. Must not be null.indexCollectionType
- The collection type of the index. Must not be null.ctx
- optional context to index on elements within a CDT.
-
createIndex
public void createIndex(String setName, 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 interfaceAerospikeOperations
- Parameters:
setName
- Set name to use.indexName
- The index name. Must not be null.binName
- The bin name to create the index on. Must not be null.indexType
- The type of the index. Must not be null.
-
createIndex
public void createIndex(String setName, 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 interfaceAerospikeOperations
- Parameters:
setName
- Set name to use.indexName
- The index name. Must not be null.binName
- The bin name to create the index on. Must not be null.indexType
- The type of the index. Must not be null.indexCollectionType
- The collection type of the index. Must not be null.
-
createIndex
public void createIndex(String setName, String indexName, String binName, com.aerospike.client.query.IndexType indexType, com.aerospike.client.query.IndexCollectionType indexCollectionType, com.aerospike.client.cdt.CTX... ctx) Description copied from interface:AerospikeOperations
Create an index with the specified name in Aerospike.- Specified by:
createIndex
in interfaceAerospikeOperations
- 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 on elements within a CDT.
-
deleteIndex
Description copied from interface:AerospikeOperations
Delete an index with the specified name in Aerospike.- Specified by:
deleteIndex
in interfaceAerospikeOperations
- Parameters:
entityClass
- The class to extract set name from. Must not be null.indexName
- The index name. Must not be null.
-
deleteIndex
Description copied from interface:AerospikeOperations
Delete an index with the specified name within the given set in Aerospike.- Specified by:
deleteIndex
in interfaceAerospikeOperations
- Parameters:
setName
- Set name to use.indexName
- The index name. Must not be null.
-
indexExists
Description copied from interface:AerospikeOperations
Check whether an index with the specified name exists in Aerospike.- Specified by:
indexExists
in interfaceAerospikeOperations
- Parameters:
indexName
- The Aerospike index name. Must not be null.- Returns:
- true if exists
-
getSetName
-
getSetName
-
getMappingContext
-
getAerospikeConverter
-
getNamespace
-
getBatchWriteForSave
public <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData<T> getBatchWriteForSave(T document, String setName) -
getBatchWriteForInsert
public <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData<T> getBatchWriteForInsert(T document, String setName) -
getBatchWriteForUpdate
public <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData<T> getBatchWriteForUpdate(T document, String setName) -
getBatchWriteForDelete
public <T> org.springframework.data.aerospike.core.BaseAerospikeTemplate.BatchWriteData<T> getBatchWriteForDelete(T document, String setName)
-