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 |
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) |
List<String> |
query(IndexQuery query)
Deprecated.
use
queryStream(IndexQuery query) instead. |
Iterable<RawQuery.Result<String>> |
query(RawQuery query)
Deprecated.
use
queryStream(RawQuery query) instead. |
Long |
queryCount(IndexQuery query) |
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 register(String store, String key, KeyInformation information) throws BackendException
BackendException@Deprecated public List<String> query(IndexQuery query) throws BackendException
queryStream(IndexQuery query) instead.BackendExceptionpublic Stream<String> queryStream(IndexQuery query) throws BackendException
BackendExceptionpublic Long queryCount(IndexQuery query) throws BackendException
BackendException@Deprecated public Iterable<RawQuery.Result<String>> query(RawQuery query) throws BackendException
queryStream(RawQuery query) instead.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.