public interface ColumnTemplateAsync
ColumnEntity to do async operationsColumnFamilyManagerAsync| Modifier and Type | Method and Description |
|---|---|
<T> void |
count(Class<T> entityClass,
Consumer<Long> callback)
Returns the number of elements from column family
|
void |
count(String columnFamily,
Consumer<Long> callback)
Returns the number of elements from column family
|
<T,K> void |
delete(Class<T> entityClass,
K id)
Deletes by Id.
|
<T,K> void |
delete(Class<T> entityClass,
K id,
Consumer<Void> callback)
Deletes by Id.
|
void |
delete(ColumnDeleteQuery query)
Deletes an entity asynchronously
|
void |
delete(ColumnDeleteQuery query,
Consumer<Void> callback)
Deletes an entity asynchronously
|
<T,K> void |
find(Class<T> entityClass,
K id,
Consumer<Optional<T>> callback)
Finds by Id.
|
default <T> void |
insert(Iterable<T> entities)
Inserts entities asynchronously, by default it's just run for each saving using
ColumnTemplate.insert(Object),
each NoSQL vendor might replace to a more appropriate one. |
default <T> void |
insert(Iterable<T> entities,
Duration ttl)
Inserts entities asynchronously with time to live, by default it's just run for each saving using
ColumnTemplate.insert(Object, Duration),
each NoSQL vendor might replace to a more appropriate one. |
<T> void |
insert(T entity)
Inserts an entity asynchronously
|
<T> void |
insert(T entity,
Consumer<T> callback)
Inserts an entity asynchronously
|
<T> void |
insert(T entity,
Duration ttl)
Inserts an entity asynchronously with time to live
|
<T> void |
insert(T entity,
Duration ttl,
Consumer<T> callback)
Inserts an entity asynchronously with time to live
|
PreparedStatementAsync |
prepare(String query)
Creates a
PreparedStatementAsync from the query |
<T> void |
query(String query,
Consumer<Stream<T>> callback)
Executes a query then bring the result as a
Stream |
<T> void |
select(ColumnQuery query,
Consumer<Stream<T>> callback)
Finds entities from query asynchronously
|
<T> void |
singleResult(ColumnQuery query,
Consumer<Optional<T>> callback)
Execute a query to consume an unique result
|
<T> void |
singleResult(String query,
Consumer<Optional<T>> callback)
Executes a query then bring the result as a unique result
|
<T> void |
update(Iterable<T> entities)
Inserts entities asynchronously, by default it's just run for each saving using
ColumnTemplate.update(Object),
each NoSQL vendor might replace to a more appropriate one. |
<T> void |
update(T entity)
Inserts an entity asynchronously
|
<T> void |
update(T entity,
Consumer<T> callback)
Inserts an entity asynchronously
|
<T> void insert(T entity)
T - the instance typeentity - entity to be savedjakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when entity is null<T> void insert(T entity,
Duration ttl)
T - the instance typeentity - entity to be savedttl - the time to livejakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when either entity or ttl are nulldefault <T> void insert(Iterable<T> entities)
ColumnTemplate.insert(Object),
each NoSQL vendor might replace to a more appropriate one.T - the instance typeentities - entities to be savedjakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when entities is nulldefault <T> void insert(Iterable<T> entities, Duration ttl)
ColumnTemplate.insert(Object, Duration),
each NoSQL vendor might replace to a more appropriate one.T - the instance typeentities - entities to be savedttl - time to livejakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when either entities or ttl are null<T> void insert(T entity,
Consumer<T> callback)
T - the instance typeentity - entity to be savedcallback - the callback, when the process is finished will call this instance returning
the saved entity within parametersjakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when either entity or callback are null<T> void insert(T entity,
Duration ttl,
Consumer<T> callback)
T - the instance typeentity - entity to be savedttl - time to livecallback - the callback, when the process is finished will call this instance returning
the saved entity within parametersjakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when either entity or ttl or callback are null<T> void update(T entity)
T - the instance typeentity - entity to be updatedjakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when entity is null<T> void update(Iterable<T> entities)
ColumnTemplate.update(Object),
each NoSQL vendor might replace to a more appropriate one.T - the instance typeentities - entities to be savedjakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when entities is null<T> void update(T entity,
Consumer<T> callback)
T - the instance typeentity - entity to be updatedcallback - the callback, when the process is finished will call this instance returning
the updated entity within parametersajakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when either entity or callback are nullvoid delete(ColumnDeleteQuery query)
query - query to delete an entityjakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when query are nullvoid delete(ColumnDeleteQuery query, Consumer<Void> callback)
query - query to delete an entitycallback - the callback, when the process is finished will call this instance returning
the null within parametersjakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to delete asynchronousNullPointerException - when either query or callback are null<T> void select(ColumnQuery query, Consumer<Stream<T>> callback)
T - the instance typequery - query to select entitiescallback - the callback, when the process is finished will call this instance returning
the result of query within parametersjakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when either query or callback are null<T> void query(String query, Consumer<Stream<T>> callback)
StreamT - the entity typecallback - the callback, when the process is finished will call this instance returningquery - the queryNullPointerException - when the query is null<T> void singleResult(String query, Consumer<Optional<T>> callback)
T - the entity typecallback - the callback, when the process is finished will call this instance returningquery - the queryNullPointerException - when the query is nulljakarta.nosql.NonUniqueResultException - if returns more than one resultPreparedStatementAsync prepare(String query)
PreparedStatementAsync from the queryquery - the queryPreparedStatementAsync instanceNullPointerException - when the query is null<T,K> void find(Class<T> entityClass, K id, Consumer<Optional<T>> callback)
T - the entity class typeK - the id typeentityClass - the entity classid - the id valuecallback - the callback observerNullPointerException - when either the entityClass or id are nullIdNotFoundException - when the entityClass does not have the Id annotation<T,K> void delete(Class<T> entityClass, K id, Consumer<Void> callback)
T - the entity class typeK - the id typeentityClass - the entity classid - the id valuecallback - the callbackNullPointerException - when either the entityClass or id are nullIdNotFoundException - when the entityClass does not have the Id annotation<T,K> void delete(Class<T> entityClass, K id)
T - the entity class typeK - the id typeentityClass - the entity classid - the id valueNullPointerException - when either the entityClass or id are nullIdNotFoundException - when the entityClass does not have the Id annotationvoid count(String columnFamily, Consumer<Long> callback)
columnFamily - the column familycallback - the callback with the responseNullPointerException - when there is null parameterUnsupportedOperationException - when the database dot not have support<T> void count(Class<T> entityClass, Consumer<Long> callback)
T - the entity typeentityClass - the entity classcallback - the callback with the responseNullPointerException - when there is null parameterUnsupportedOperationException - when the database dot not have support<T> void singleResult(ColumnQuery query, Consumer<Optional<T>> callback)
T - the typequery - the querycallback - the callbackjakarta.nosql.ExecuteAsyncQueryException - when there is a async errorUnsupportedOperationException - when the database does not have support to insert asynchronousNullPointerException - when either query or callback are nulljakarta.nosql.NonUniqueResultException - when it returns more than one resultCopyright © 2017–2019 Eclipse Foundation. All rights reserved.