public class ReactiveAerospikeTemplate extends java.lang.Object implements ReactiveAerospikeOperations
ReactiveAerospikeOperations.| Constructor and Description |
|---|
ReactiveAerospikeTemplate(ReactiveQueryEngine queryEngine,
java.lang.String namespace,
MappingAerospikeConverter converter,
AerospikeMappingContext mappingContext,
AerospikeExceptionTranslator exceptionTranslator)
Creates a new
ReactiveAerospikeTemplate for the given
AerospikeClient. |
| Modifier and Type | Method and Description |
|---|---|
<T> reactor.core.publisher.Mono<T> |
add(T objectToAddTo,
java.util.Map<java.lang.String,java.lang.Long> values) |
<T> reactor.core.publisher.Mono<T> |
add(T objectToAddTo,
java.lang.String binName,
long value) |
protected java.util.function.Function<java.lang.Object,AerospikeWriteData> |
aerospikeWriteDataFunction() |
<T> reactor.core.publisher.Flux<T> |
aggregate(com.aerospike.client.query.Filter filter,
java.lang.Class<T> outputType,
java.lang.String module,
java.lang.String function,
java.util.List<com.aerospike.client.Value> arguments) |
<T> reactor.core.publisher.Mono<T> |
append(T objectToAppendTo,
java.util.Map<java.lang.String,java.lang.String> values) |
<T> reactor.core.publisher.Mono<T> |
append(T objectToAppendTo,
java.lang.String binName,
java.lang.String value) |
reactor.core.publisher.Mono<java.lang.Long> |
count(java.lang.Class<?> type) |
reactor.core.publisher.Mono<java.lang.Long> |
count(java.lang.Class<?> type,
java.lang.String setName) |
reactor.core.publisher.Mono<java.lang.Long> |
count(Query query,
java.lang.Class<?> type) |
protected <T> reactor.core.publisher.Flux<T> |
createFlux(org.reactivestreams.Publisher<T> publisher) |
<T> reactor.core.publisher.Mono<java.lang.Void> |
createIndex(java.lang.Class<T> domainType,
java.lang.String indexName,
java.lang.String binName,
com.aerospike.client.query.IndexType indexType)
Creates index by specified name in Aerospike.
|
protected <T> reactor.core.publisher.Mono<T> |
createMono(org.reactivestreams.Publisher<T> publisher) |
reactor.core.publisher.Mono<java.lang.Boolean> |
delete(java.lang.Class<?> type) |
reactor.core.publisher.Mono<java.lang.Boolean> |
delete(java.lang.Object objectToDelete) |
reactor.core.publisher.Mono<java.lang.Boolean> |
delete(java.lang.Object id,
java.lang.Class<?> type) |
<T> reactor.core.publisher.Mono<java.lang.Void> |
deleteIndex(java.lang.Class<T> domainType,
java.lang.String indexName)
Deletes index by specified name from Aerospike.
|
<T> reactor.core.publisher.Mono<T> |
execute(java.util.function.Supplier<T> supplier)
Execute operation against underlying store.
|
reactor.core.publisher.Mono<java.lang.Boolean> |
exists(java.lang.Object id,
java.lang.Class<?> type) |
reactor.core.publisher.Mono<java.lang.Boolean> |
exists(Query query,
java.lang.Class<?> type) |
<T> reactor.core.publisher.Flux<T> |
find(Query query,
java.lang.Class<T> type) |
<T> reactor.core.publisher.Flux<T> |
findAll(java.lang.Class<T> type) |
<T> reactor.core.publisher.Flux<T> |
findAll(org.springframework.data.domain.Sort sort,
java.lang.Class<T> type) |
<T> reactor.core.publisher.Mono<T> |
findById(java.lang.Object id,
java.lang.Class<T> type) |
<T> reactor.core.publisher.Flux<T> |
findByIds(java.lang.Iterable<?> ids,
java.lang.Class<T> type) |
<T> reactor.core.publisher.Flux<T> |
findInRange(long offset,
long limit,
org.springframework.data.domain.Sort sort,
java.lang.Class<T> type) |
com.aerospike.client.AerospikeClient |
getAerospikeClient() |
protected WritePolicyBuilder |
getCasAwareWritePolicyBuilder(AerospikeWriteData data,
AerospikePersistentEntity<?> entity,
org.springframework.data.mapping.model.ConvertingPropertyAccessor<?> accessor) |
protected abstract MappingAerospikeConverter |
getConverter() |
protected abstract AerospikeExceptionTranslator |
getExceptionTranslator() |
abstract org.springframework.data.mapping.context.MappingContext<BasicAerospikePersistentEntity<?>,AerospikePersistentProperty> |
getMappingContext() |
java.lang.String |
getNamespace() |
protected <T> org.springframework.data.mapping.model.ConvertingPropertyAccessor<T> |
getPropertyAccessor(AerospikePersistentEntity<?> entity,
T source) |
java.lang.String |
getSetName(java.lang.Class<?> entityClass)
The Set name used for the specified class by this template.
|
protected WritePolicyBuilder |
getWritePolicyBuilder() |
reactor.core.publisher.Mono<java.lang.Boolean> |
indexExists(java.lang.String indexName)
Checks whether index by specified name exists in Aerospike.
|
<T> reactor.core.publisher.Mono<T> |
insert(T document)
Insert operation using the WritePolicy.recordExisits policy of CREATE_ONLY
|
<T> void |
insertAll(java.util.Collection<? extends T> documents) |
protected <T> T |
mapToEntity(com.aerospike.client.Key key,
java.lang.Class<T> type,
com.aerospike.client.Record record) |
<T> reactor.core.publisher.Mono<T> |
persist(T document,
com.aerospike.client.policy.WritePolicy writePolicy)
Persist document using specified WritePolicy
|
<T> reactor.core.publisher.Mono<T> |
prepend(T objectToPrependTo,
java.util.Map<java.lang.String,java.lang.String> values) |
<T> reactor.core.publisher.Mono<T> |
prepend(T objectToPrependTo,
java.lang.String fieldName,
java.lang.String value) |
<T> reactor.core.publisher.Mono<T> |
save(T document)
Save operation.
|
protected java.util.function.Function<java.lang.Throwable,java.lang.Exception> |
translateException() |
<T> reactor.core.publisher.Mono<T> |
update(T document)
Update operation using the WritePolicy.recordExisits policy of UPDATE_ONLY
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEngine, getMappingContextpublic ReactiveAerospikeTemplate(ReactiveQueryEngine queryEngine, java.lang.String namespace, MappingAerospikeConverter converter, AerospikeMappingContext mappingContext, AerospikeExceptionTranslator exceptionTranslator)
ReactiveAerospikeTemplate for the given
AerospikeClient.converter - mappingContext - exceptionTranslator - namespace - must not be null or empty.public <T> reactor.core.publisher.Mono<java.lang.Void> createIndex(java.lang.Class<T> domainType,
java.lang.String indexName,
java.lang.String binName,
com.aerospike.client.query.IndexType indexType)
ReactiveAerospikeOperationscreateIndex in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<java.lang.Void> deleteIndex(java.lang.Class<T> domainType,
java.lang.String indexName)
ReactiveAerospikeOperationsdeleteIndex in interface ReactiveAerospikeOperationspublic reactor.core.publisher.Mono<java.lang.Boolean> indexExists(java.lang.String indexName)
ReactiveAerospikeOperationsindexExists in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<T> save(T document)
ReactiveAerospikeOperationsIf document has version property - CAS algorithm is used for updating record. Version property is used for deciding whether to create new record or update existing. If version is set to zero - new record will be created, creation will fail is such record already exists. If version is greater than zero - existing record will be updated with RecordExistsAction.REPLACE_ONLY policy taking into consideration the version property of the document.
If document does not have version property - record is updated with RecordExistsAction.UPDATE policy. This means that when such record does not exist it will be created, otherwise updated.
save in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<T> persist(T document,
com.aerospike.client.policy.WritePolicy writePolicy)
ReactiveAerospikeOperationspersist in interface ReactiveAerospikeOperationspublic <T> void insertAll(java.util.Collection<? extends T> documents)
public <T> reactor.core.publisher.Mono<T> insert(T document)
ReactiveAerospikeOperationsinsert in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<T> update(T document)
ReactiveAerospikeOperationsupdate in interface ReactiveAerospikeOperationspublic reactor.core.publisher.Mono<java.lang.Boolean> delete(java.lang.Class<?> type)
delete in interface ReactiveAerospikeOperationspublic reactor.core.publisher.Mono<java.lang.Boolean> delete(java.lang.Object id,
java.lang.Class<?> type)
delete in interface ReactiveAerospikeOperationspublic reactor.core.publisher.Mono<java.lang.Boolean> delete(java.lang.Object objectToDelete)
delete in interface ReactiveAerospikeOperationspublic reactor.core.publisher.Mono<java.lang.Boolean> exists(java.lang.Object id,
java.lang.Class<?> type)
exists in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Flux<T> findAll(java.lang.Class<T> type)
findAll in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<T> findById(java.lang.Object id,
java.lang.Class<T> type)
findById in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Flux<T> findByIds(java.lang.Iterable<?> ids,
java.lang.Class<T> type)
findByIds in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Flux<T> aggregate(com.aerospike.client.query.Filter filter,
java.lang.Class<T> outputType,
java.lang.String module,
java.lang.String function,
java.util.List<com.aerospike.client.Value> arguments)
aggregate in interface ReactiveAerospikeOperationspublic java.lang.String getSetName(java.lang.Class<?> entityClass)
ReactiveAerospikeOperationsgetSetName in interface ReactiveAerospikeOperationsentityClass - must not be null.public <T> reactor.core.publisher.Flux<T> findAll(org.springframework.data.domain.Sort sort,
java.lang.Class<T> type)
findAll in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<T> execute(java.util.function.Supplier<T> supplier)
ReactiveAerospikeOperationsexecute in interface ReactiveAerospikeOperationssupplier - must not be null.public reactor.core.publisher.Mono<java.lang.Boolean> exists(Query query, java.lang.Class<?> type)
exists in interface ReactiveAerospikeOperationspublic reactor.core.publisher.Mono<java.lang.Long> count(Query query, java.lang.Class<?> type)
count in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Flux<T> find(Query query, java.lang.Class<T> type)
find in interface ReactiveAerospikeOperationspublic java.lang.String getNamespace()
public <T> reactor.core.publisher.Flux<T> findInRange(long offset,
long limit,
org.springframework.data.domain.Sort sort,
java.lang.Class<T> type)
findInRange in interface ReactiveAerospikeOperationspublic reactor.core.publisher.Mono<java.lang.Long> count(java.lang.Class<?> type)
count in interface ReactiveAerospikeOperationspublic com.aerospike.client.AerospikeClient getAerospikeClient()
public reactor.core.publisher.Mono<java.lang.Long> count(java.lang.Class<?> type,
java.lang.String setName)
count in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<T> prepend(T objectToPrependTo,
java.lang.String fieldName,
java.lang.String value)
prepend in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<T> prepend(T objectToPrependTo,
java.util.Map<java.lang.String,java.lang.String> values)
prepend in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<T> append(T objectToAppendTo,
java.util.Map<java.lang.String,java.lang.String> values)
append in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<T> append(T objectToAppendTo,
java.lang.String binName,
java.lang.String value)
append in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<T> add(T objectToAddTo,
java.util.Map<java.lang.String,java.lang.Long> values)
add in interface ReactiveAerospikeOperationspublic <T> reactor.core.publisher.Mono<T> add(T objectToAddTo,
java.lang.String binName,
long value)
add in interface ReactiveAerospikeOperationsprotected abstract MappingAerospikeConverter getConverter()
protected abstract AerospikeExceptionTranslator getExceptionTranslator()
public abstract org.springframework.data.mapping.context.MappingContext<BasicAerospikePersistentEntity<?>,AerospikePersistentProperty> getMappingContext()
protected java.util.function.Function<java.lang.Throwable,java.lang.Exception> translateException()
protected <T> reactor.core.publisher.Mono<T> createMono(org.reactivestreams.Publisher<T> publisher)
protected <T> reactor.core.publisher.Flux<T> createFlux(org.reactivestreams.Publisher<T> publisher)
protected java.util.function.Function<java.lang.Object,AerospikeWriteData> aerospikeWriteDataFunction()
protected <T> T mapToEntity(com.aerospike.client.Key key,
java.lang.Class<T> type,
com.aerospike.client.Record record)
protected <T> org.springframework.data.mapping.model.ConvertingPropertyAccessor<T> getPropertyAccessor(AerospikePersistentEntity<?> entity, T source)
protected WritePolicyBuilder getWritePolicyBuilder()
protected WritePolicyBuilder getCasAwareWritePolicyBuilder(AerospikeWriteData data, AerospikePersistentEntity<?> entity, org.springframework.data.mapping.model.ConvertingPropertyAccessor<?> accessor)