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) |
<T> long |
count(Class<T> entityClass,
String setName) |
<T> long |
count(Query query,
Class<T> entityClass) |
<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 |
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) |
<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.AerospikeClient |
getAerospikeClient() |
MappingContext<?,?> |
getMappingContext() |
<T> String |
getSetName(Class<T> entityClass)
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 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 - 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 - <T> void persist(T document,
com.aerospike.client.policy.WritePolicy writePolicy)
document - writePolicy - <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 - <T> void delete(Class<T> entityClass)
<T> boolean delete(T objectToDelete)
<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> Iterable<T> findAll(Sort sort, Class<T> entityClass)
sort - entityClass - <T> Stream<T> findInRange(long offset, long limit, Sort sort, Class<T> entityClass)
offset - limit - sort - entityClass - <T> void createIndex(Class<T> entityClass, String indexName, String binName, com.aerospike.client.query.IndexType indexType)
entityClass - indexName - binName - indexType - <T> void deleteIndex(Class<T> entityClass, String indexName)
entityClass - indexName - @Deprecated boolean indexExists(String indexName)
If you need to conditionally create index — replace indexExists(java.lang.String) 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 - <T> long count(Class<T> entityClass)
entityClass - com.aerospike.client.AerospikeClient getAerospikeClient()
Copyright © 2012–2020 Aerospike, Inc. All rights reserved.