public interface AerospikeOperations
| Modifier and Type | Method and Description |
|---|---|
<T> T |
add(T objectToAddTo,
Map<String,Long> values) |
<T> T |
add(T objectToAddTo,
String binName,
long value) |
<T> Iterable<T> |
aggregate(com.aerospike.client.query.Filter filter,
Class<T> entityClass,
String module,
String function,
List<com.aerospike.client.Value> arguments) |
<T> T |
append(T objectToAppendTo,
Map<String,String> values) |
<T> T |
append(T objectToAppendTo,
String binName,
String value) |
<T> long |
count(Class<T> entityClass)
Returns the amount of records in the given entityClass's Aerospike set and AerospikeTemplate configured namespace.
|
<T> long |
count(Query query,
Class<T> entityClass)
Returns the amount of records in a query results.
|
<T> long |
count(String setName)
Returns the amount of records in the given Aerospike set and AerospikeTemplate configured namespace.
|
<T> void |
createIndex(Class<T> entityClass,
String indexName,
String binName,
com.aerospike.client.query.IndexType indexType)
Creates index by 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)
Creates index by specified name in Aerospike.
|
<T> void |
delete(Class<T> entityClass) |
<T> boolean |
delete(Object id,
Class<T> entityClass) |
<T> boolean |
delete(T objectToDelete) |
<T> void |
deleteIndex(Class<T> entityClass,
String indexName)
Deletes index by specified name from Aerospike.
|
<T> T |
execute(Supplier<T> supplier)
Execute operation against underlying store.
|
<T> boolean |
exists(Object id,
Class<T> entityClass) |
<T> Stream<T> |
find(Query query,
Class<T> entityClass) |
<T> Stream<T> |
findAll(Class<T> entityClass) |
<T> Iterable<T> |
findAll(Sort sort,
Class<T> entityClass) |
<T> T |
findById(Object id,
Class<T> entityClass) |
GroupedEntities |
findByIds(GroupedKeys groupedKeys) |
<T> List<T> |
findByIds(Iterable<?> ids,
Class<T> entityClass) |
<T> Stream<T> |
findInRange(long offset,
long limit,
Sort sort,
Class<T> entityClass) |
com.aerospike.client.IAerospikeClient |
getAerospikeClient() |
MappingContext<?,?> |
getMappingContext() |
<T> String |
getSetName(Class<T> entityClass)
Returns the Set name used for the specified class by this template.
|
boolean |
indexExists(String indexName)
Deprecated.
This operation is deprecated due to complications that are required for guaranteed index existence response.
If you need to conditionally create index — replace this method (indexExists) with More information can be found at: https://github.com/aerospike/aerospike-client-java/pull/149 |
<T> void |
insert(T document)
Insert operation using
RecordExistsAction.CREATE_ONLY policy. |
<T> void |
persist(T document,
com.aerospike.client.policy.WritePolicy writePolicy)
Persist document using specified WritePolicy.
|
<T> T |
prepend(T objectToPrependTo,
Map<String,String> values) |
<T> T |
prepend(T objectToPrependTo,
String binName,
String value) |
<T> void |
save(T document)
Save operation.
|
<T> void |
update(T objectToUpdate)
Update operation using
RecordExistsAction.REPLACE_ONLY policy
taking into consideration the version property of the document if it is present. |
<T> String getSetName(Class<T> entityClass)
entityClass - must not be null.<T> void insert(T document)
RecordExistsAction.CREATE_ONLY policy.
If document has version property it will be updated with the server's version after successful operation.document - The document to insert.MappingContext<?,?> getMappingContext()
<T> void save(T document)
RecordExistsAction.REPLACE_ONLY policy
taking into consideration the version property of the document.
Version property will be updated with the server's version after successful operation.
If document does not have version property - record is updated with RecordExistsAction.REPLACE policy.
This means that when such record does not exist it will be created, otherwise updated.document - The document to save.<T> void persist(T document,
com.aerospike.client.policy.WritePolicy writePolicy)
document - The document to persist.writePolicy - The Aerospike write policy for the inner Aerospike put operation.<T> void update(T objectToUpdate)
RecordExistsAction.REPLACE_ONLY policy
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.objectToUpdate - The object to update.<T> void delete(Class<T> entityClass)
<T> boolean delete(T objectToDelete)
GroupedEntities findByIds(GroupedKeys groupedKeys)
<T> T add(T objectToAddTo,
String binName,
long value)
<T> Iterable<T> aggregate(com.aerospike.client.query.Filter filter, Class<T> entityClass, String module, String function, List<com.aerospike.client.Value> arguments)
<T> T execute(Supplier<T> supplier)
supplier - must not be null.<T> long count(Query query, Class<T> entityClass)
query - The query that provides the result set for count.entityClass - The class to provide for the query.<T> long count(String setName)
<T> long count(Class<T> entityClass)
entityClass - The class to extract the Aerospike set from.<T> void createIndex(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType)
<T> void createIndex(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType, com.aerospike.client.query.IndexCollectionType indexCollectionType)
<T> void deleteIndex(Class<T> entityClass, String indexName)
@Deprecated boolean indexExists(String indexName)
If you need to conditionally create index — replace this method (indexExists) with createIndex(java.lang.Class<T>, java.lang.String, java.lang.String, com.aerospike.client.query.IndexType) and catch IndexAlreadyExistsException.
More information can be found at: https://github.com/aerospike/aerospike-client-java/pull/149
indexName - The Aerospike index namecom.aerospike.client.IAerospikeClient getAerospikeClient()
Copyright © 2020–2021 Aerospike, Inc. All rights reserved.