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)
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,
int 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) |
void |
delete(Class<?> type) |
<T> T |
delete(Serializable id,
Class<T> type) |
<T> T |
delete(T objectToDelete) |
<T> T |
execute(org.springframework.data.keyvalue.core.KeyValueCallback<T> action)
Execute operation against underlying store.
|
boolean |
exists(Query<?> query,
Class<?> entityClass) |
<T> Iterable<T> |
find(Query<?> query,
Class<T> type) |
<T> List<T> |
findAll(Class<T> type) |
<T> Iterable<T> |
findAll(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> T |
findById(Serializable id,
Class<T> type,
Class<T> domainType) |
<T> Iterable<T> |
findInRange(int offset,
int rows,
Sort sort,
Class<T> type) |
<T> T |
findOne(Serializable id,
Class<T> type) |
MappingContext<?,?> |
getMappingContext() |
String |
getNamespace() |
String |
getSetName(Class<?> entityClass)
The Set name used for the specified class by this template.
|
void |
insert(Serializable id,
Object objectToInsert)
Insert operation using the WritePolicy.recordExisits policy of CREATE_ONLY
|
void |
insert(Serializable id,
Object objectToInsert,
com.aerospike.client.policy.WritePolicy policy)
Insert operation using the WritePolicy specified.
|
<T> T |
insert(T objectToInsert)
Insert operation using the WritePolicy.recordExisits policy of CREATE_ONLY
|
<T> T |
insert(T objectToInsert,
com.aerospike.client.policy.WritePolicy policy)
Insert operation using the WritePolicy specified.
|
<T> void |
insertAll(Collection<? extends T> objectsToSave) |
<T> T |
prepend(T objectToPrependTo,
Map<String,String> values) |
<T> T |
prepend(T objectToPrependTo,
String fieldName,
String value) |
void |
save(Serializable id,
Object objectToInsert)
Save operation using the WritePolicy.recordExisits policy of CREATE_ONLY
|
<T> void |
save(Serializable id,
Object objectToInsert,
Class<T> domainType) |
<T> void |
save(Serializable id,
Object objectToInsert,
Class<T> domainType,
com.aerospike.client.policy.WritePolicy policy) |
void |
save(Serializable id,
Object objectToInsert,
com.aerospike.client.policy.WritePolicy policy)
Save operation using the WritePolicy specified.
|
void |
setExceptionTranslator(AerospikeExceptionTranslator exceptionTranslator)
Configures the
AerospikeExceptionTranslator to be used. |
void |
update(Object objectToUpdate) |
void |
update(Object objectToUpdate,
com.aerospike.client.policy.WritePolicy policy) |
void |
update(Serializable id,
Object objectToUpdate) |
void |
update(Serializable id,
Object objectToUpdate,
com.aerospike.client.policy.WritePolicy policy) |
public AerospikeTemplate(com.aerospike.client.AerospikeClient client,
String namespace)
AerospikeTemplate for the given
AerospikeClient.client - must not be null.public void insert(Serializable id, Object objectToInsert)
AerospikeOperationsinsert in interface AerospikeOperationspublic void insert(Serializable id, Object objectToInsert, com.aerospike.client.policy.WritePolicy policy)
AerospikeOperationsinsert in interface AerospikeOperationspublic <T> void createIndex(Class<T> domainType, String indexName, String binName, com.aerospike.client.query.IndexType indexType)
createIndex in interface AerospikeOperationspublic <T> void save(Serializable id, Object objectToInsert, Class<T> domainType)
save in interface AerospikeOperationspublic <T> void save(Serializable id, Object objectToInsert, Class<T> domainType, com.aerospike.client.policy.WritePolicy policy)
save in interface AerospikeOperationspublic <T> T findById(Serializable id, Class<T> type, Class<T> domainType)
findById in interface AerospikeOperationspublic void save(Serializable id, Object objectToInsert)
AerospikeOperationssave in interface AerospikeOperationspublic void save(Serializable id, Object objectToInsert, com.aerospike.client.policy.WritePolicy policy)
AerospikeOperationssave in interface AerospikeOperationspublic <T> void insertAll(Collection<? extends T> objectsToSave)
public <T> T insert(T objectToInsert)
AerospikeOperationsinsert in interface AerospikeOperationspublic <T> T insert(T objectToInsert,
com.aerospike.client.policy.WritePolicy policy)
AerospikeOperationsinsert in interface AerospikeOperationspublic void update(Object objectToUpdate)
update in interface AerospikeOperationspublic void update(Object objectToUpdate, com.aerospike.client.policy.WritePolicy policy)
update in interface AerospikeOperationspublic void update(Serializable id, Object objectToUpdate)
update in interface AerospikeOperationspublic void update(Serializable id, Object objectToUpdate, com.aerospike.client.policy.WritePolicy policy)
update in interface AerospikeOperationspublic void delete(Class<?> type)
delete in interface AerospikeOperationspublic <T> T delete(Serializable id, Class<T> type)
delete in interface AerospikeOperationspublic <T> T delete(T objectToDelete)
delete in interface AerospikeOperationspublic <T> List<T> findAll(Class<T> type)
findAll in interface AerospikeOperationspublic <T> T findOne(Serializable id, Class<T> type)
findOne in interface AerospikeOperationspublic <T> T findById(Serializable id, Class<T> type)
findById 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 void setExceptionTranslator(AerospikeExceptionTranslator exceptionTranslator)
AerospikeExceptionTranslator to be used.exceptionTranslator - can be null.public String getSetName(Class<?> entityClass)
AerospikeOperationsgetSetName in interface AerospikeOperationsentityClass - must not be null.public <T> Iterable<T> findAll(Sort sort, Class<T> type)
findAll in interface AerospikeOperationspublic <T> T execute(org.springframework.data.keyvalue.core.KeyValueCallback<T> action)
AerospikeOperationsexecute in interface AerospikeOperationsaction - 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 MappingContext<?,?> getMappingContext()
getMappingContext in interface AerospikeOperationspublic String getNamespace()
public <T> Iterable<T> findInRange(int offset, int rows, Sort sort, Class<T> type)
findInRange in interface AerospikeOperationspublic long count(Class<?> type)
count 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,
int value)
add in interface AerospikeOperationsCopyright © 2011-2015–2017 Aerospike Inc.. All rights reserved.