public class AerospikeTemplate extends Object implements AerospikeOperations
AerospikeOperations.| Modifier and Type | Class and Description |
|---|---|
class |
AerospikeTemplate.EntityIterator<T> |
| Constructor and Description |
|---|
AerospikeTemplate(com.aerospike.client.AerospikeClient client,
String namespace) |
AerospikeTemplate(com.aerospike.client.AerospikeClient client,
String namespace,
MappingAerospikeConverter converter,
AerospikeMappingContext mappingContext,
AerospikeExceptionTranslator exceptionTranslator)
Creates a new
AerospikeTemplate for the given
AerospikeClient. |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
add(T objectToAddTo,
Map<String,Long> values) |
<T> T |
add(T objectToAddTo,
String binName,
long value) |
Comparator<?> |
aerospikePropertyComparator(Query query) |
<T> Iterable<T> |
aggregate(com.aerospike.client.query.Filter filter,
Class<T> outputType,
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) |
long |
count(Class<?> type) |
long |
count(Class<?> type,
String setName) |
int |
count(Query query,
Class<?> type) |
<T> void |
createIndex(Class<T> domainType,
String indexName,
String binName,
com.aerospike.client.query.IndexType indexType)
Creates index by specified name in Aerospike.
|
void |
delete(Class<?> type) |
boolean |
delete(Object objectToDelete) |
boolean |
delete(Serializable id,
Class<?> type) |
<T> void |
deleteIndex(Class<T> domainType,
String indexName)
Deletes index by specified name from Aerospike.
|
<T> T |
execute(Supplier<T> supplier)
Execute operation against underlying store.
|
boolean |
exists(Query query,
Class<?> entityClass) |
boolean |
exists(Serializable id,
Class<?> type) |
<T> Iterable<T> |
find(Query query,
Class<T> type) |
<T> List<T> |
findAll(Class<T> type) |
<T> Iterable<T> |
findAll(org.springframework.data.domain.Sort sort,
Class<T> type) |
protected <T> Iterable<T> |
findAllUsingQuery(Class<T> type,
com.aerospike.client.query.Filter filter,
com.aerospike.helper.query.Qualifier... qualifiers) |
<T> T |
findById(Serializable id,
Class<T> type) |
<T> List<T> |
findByIDs(Iterable<Serializable> IDs,
Class<T> type) |
<T> Iterable<T> |
findInRange(int offset,
int rows,
org.springframework.data.domain.Sort sort,
Class<T> type) |
com.aerospike.client.AerospikeClient |
getAerospikeClient() |
org.springframework.data.mapping.context.MappingContext<?,?> |
getMappingContext() |
String |
getNamespace() |
String |
getSetName(Class<?> entityClass)
The Set name used for the specified class by this template.
|
boolean |
indexExists(String indexName)
Checks whether index by specified name exists in Aerospike.
|
void |
insert(Object document)
Insert operation using the WritePolicy.recordExisits policy of CREATE_ONLY
|
<T> void |
insertAll(Collection<? extends T> documents) |
void |
persist(Object document,
com.aerospike.client.policy.WritePolicy policy)
Persist document using specified WritePolicy
|
<T> T |
prepend(T objectToPrependTo,
Map<String,String> values) |
<T> T |
prepend(T objectToPrependTo,
String fieldName,
String value) |
void |
save(Object document)
Save operation.
|
void |
update(Object document)
Update operation using the WritePolicy.recordExisits policy of UPDATE_ONLY
|
public AerospikeTemplate(com.aerospike.client.AerospikeClient client,
String namespace,
MappingAerospikeConverter converter,
AerospikeMappingContext mappingContext,
AerospikeExceptionTranslator exceptionTranslator)
AerospikeTemplate for the given
AerospikeClient.converter - mappingContext - exceptionTranslator - client - must not be null.public AerospikeTemplate(com.aerospike.client.AerospikeClient client,
String namespace)
public <T> void createIndex(Class<T> domainType, String indexName, String binName, com.aerospike.client.query.IndexType indexType)
AerospikeOperationscreateIndex in interface AerospikeOperationspublic <T> void deleteIndex(Class<T> domainType, String indexName)
AerospikeOperationsdeleteIndex in interface AerospikeOperationspublic boolean indexExists(String indexName)
AerospikeOperationsindexExists in interface AerospikeOperationspublic void save(Object document)
AerospikeOperationssave in interface AerospikeOperationspublic void persist(Object document, com.aerospike.client.policy.WritePolicy policy)
AerospikeOperationspersist in interface AerospikeOperationspublic <T> void insertAll(Collection<? extends T> documents)
public void insert(Object document)
AerospikeOperationsinsert in interface AerospikeOperationspublic void update(Object document)
AerospikeOperationsupdate in interface AerospikeOperationspublic void delete(Class<?> type)
delete in interface AerospikeOperationspublic boolean delete(Serializable id, Class<?> type)
delete in interface AerospikeOperationspublic boolean delete(Object objectToDelete)
delete in interface AerospikeOperationspublic boolean exists(Serializable id, Class<?> type)
exists in interface AerospikeOperationspublic <T> List<T> findAll(Class<T> type)
findAll in interface AerospikeOperationspublic <T> T findById(Serializable id, Class<T> type)
findById in interface AerospikeOperationspublic <T> List<T> findByIDs(Iterable<Serializable> IDs, Class<T> type)
findByIDs in interface AerospikeOperationspublic <T> Iterable<T> aggregate(com.aerospike.client.query.Filter filter, Class<T> outputType, String module, String function, List<com.aerospike.client.Value> arguments)
aggregate in interface AerospikeOperationspublic String getSetName(Class<?> entityClass)
AerospikeOperationsgetSetName in interface AerospikeOperationsentityClass - must not be null.public <T> Iterable<T> findAll(org.springframework.data.domain.Sort sort, Class<T> type)
findAll in interface AerospikeOperationspublic <T> T execute(Supplier<T> supplier)
AerospikeOperationsexecute in interface AerospikeOperationssupplier - must not be null.public int count(Query query, Class<?> type)
count in interface AerospikeOperationspublic <T> Iterable<T> find(Query query, Class<T> type)
find in interface AerospikeOperationspublic Comparator<?> aerospikePropertyComparator(Query query)
public org.springframework.data.mapping.context.MappingContext<?,?> getMappingContext()
getMappingContext in interface AerospikeOperationspublic String getNamespace()
public <T> Iterable<T> findInRange(int offset, int rows, org.springframework.data.domain.Sort sort, Class<T> type)
findInRange in interface AerospikeOperationspublic long count(Class<?> type)
count in interface AerospikeOperationspublic com.aerospike.client.AerospikeClient getAerospikeClient()
getAerospikeClient in interface AerospikeOperationspublic long count(Class<?> type, String setName)
count in interface AerospikeOperationsprotected <T> Iterable<T> findAllUsingQuery(Class<T> type, com.aerospike.client.query.Filter filter, com.aerospike.helper.query.Qualifier... qualifiers)
public <T> T prepend(T objectToPrependTo,
String fieldName,
String value)
prepend in interface AerospikeOperationspublic <T> T prepend(T objectToPrependTo,
Map<String,String> values)
prepend in interface AerospikeOperationspublic <T> T append(T objectToAppendTo,
Map<String,String> values)
append in interface AerospikeOperationspublic <T> T append(T objectToAppendTo,
String binName,
String value)
append in interface AerospikeOperationspublic <T> T add(T objectToAddTo,
Map<String,Long> values)
add in interface AerospikeOperationspublic <T> T add(T objectToAddTo,
String binName,
long value)
add in interface AerospikeOperationsCopyright © 2011–2018 Aerospike Inc.. All rights reserved.