public class AerospikeTemplate extends Object implements AerospikeOperations
AerospikeOperations.| Constructor and Description |
|---|
AerospikeTemplate(com.aerospike.client.AerospikeClient client,
String namespace)
Deprecated.
|
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) |
<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) |
long |
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(Object 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(Object id,
Class<?> type) |
boolean |
exists(Query query,
Class<?> entityClass) |
<T> Stream<T> |
find(Query query,
Class<T> type) |
<T> Stream<T> |
findAll(Class<T> type) |
<T> Iterable<T> |
findAll(Sort sort,
Class<T> type) |
<T> T |
findById(Object id,
Class<T> type) |
<T> List<T> |
findByIds(Iterable<?> ids,
Class<T> type) |
<T> Stream<T> |
findInRange(long offset,
long limit,
Sort sort,
Class<T> type) |
com.aerospike.client.AerospikeClient |
getAerospikeClient() |
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.namespace - must not be null or empty.@Deprecated 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(Object id, Class<?> type)
delete in interface AerospikeOperationspublic boolean delete(Object objectToDelete)
delete in interface AerospikeOperationspublic boolean exists(Object id, Class<?> type)
exists in interface AerospikeOperationspublic <T> Stream<T> findAll(Class<T> type)
findAll in interface AerospikeOperationspublic <T> T findById(Object id, Class<T> type)
findById in interface AerospikeOperationspublic <T> List<T> findByIds(Iterable<?> 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(Sort sort, Class<T> type)
findAll in interface AerospikeOperationspublic <T> T execute(Supplier<T> supplier)
AerospikeOperationsexecute in interface AerospikeOperationssupplier - must not be null.public long count(Query query, Class<?> type)
count in interface AerospikeOperationspublic <T> Stream<T> find(Query query, Class<T> type)
find in interface AerospikeOperationspublic MappingContext<?,?> getMappingContext()
getMappingContext in interface AerospikeOperationspublic String getNamespace()
public <T> Stream<T> findInRange(long offset, long limit, 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 AerospikeOperationspublic <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 © 2012–2019 Aerospike, Inc. All rights reserved.