public class IndexTransaction extends Object implements BaseTransaction, LoggableTransaction
IndexProvider methods.| Constructor and Description |
|---|
IndexTransaction(IndexProvider index,
KeyInformation.IndexRetriever keyInformation,
BaseTransactionConfig config,
Duration maxWriteTime) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String store,
String documentId,
IndexEntry entry,
boolean isNew) |
void |
add(String store,
String documentId,
String key,
Object value,
boolean isNew) |
void |
clearStorage() |
void |
clearStore(String storeName) |
void |
commit()
Commits the transaction and persists all modifications to the backend.
|
void |
delete(String store,
String documentId,
String key,
Object value,
boolean deleteAll) |
void |
invalidate(String store) |
void |
logMutations(DataOutput out) |
Number |
queryAggregation(IndexQuery query,
Aggregation aggregation) |
Stream<String> |
queryStream(IndexQuery query) |
Stream<RawQuery.Result<String>> |
queryStream(RawQuery query) |
void |
register(String store,
String key,
KeyInformation information) |
void |
restore(Map<String,Map<String,List<IndexEntry>>> documents) |
void |
rollback()
Aborts (or rolls back) the transaction.
|
Long |
totals(RawQuery query) |
public IndexTransaction(IndexProvider index, KeyInformation.IndexRetriever keyInformation, BaseTransactionConfig config, Duration maxWriteTime) throws BackendException
BackendExceptionpublic void add(String store, String documentId, IndexEntry entry, boolean isNew)
public void delete(String store, String documentId, String key, Object value, boolean deleteAll)
public void clearStorage()
throws BackendException
BackendExceptionpublic void clearStore(String storeName) throws BackendException
BackendExceptionpublic void register(String store, String key, KeyInformation information) throws BackendException
BackendExceptionpublic Stream<String> queryStream(IndexQuery query) throws BackendException
BackendExceptionpublic Number queryAggregation(IndexQuery query, Aggregation aggregation) throws BackendException
BackendExceptionpublic Stream<RawQuery.Result<String>> queryStream(RawQuery query) throws BackendException
BackendExceptionpublic Long totals(RawQuery query) throws BackendException
BackendExceptionpublic void restore(Map<String,Map<String,List<IndexEntry>>> documents) throws BackendException
BackendExceptionpublic void commit()
throws BackendException
BaseTransactionBaseTransaction.rollback() at most once per instance.commit in interface BaseTransactionBackendExceptionpublic void rollback()
throws BackendException
BaseTransactionBaseTransaction.commit() at most once per instance.rollback in interface BaseTransactionBackendExceptionpublic void logMutations(DataOutput out)
logMutations in interface LoggableTransactionpublic void invalidate(String store)
Copyright © 2012–2023. All rights reserved.