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
BackendException
public 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
BackendException
public void clearStore(String storeName) throws BackendException
BackendException
public void register(String store, String key, KeyInformation information) throws BackendException
BackendException
public Stream<String> queryStream(IndexQuery query) throws BackendException
BackendException
public Number queryAggregation(IndexQuery query, Aggregation aggregation) throws BackendException
BackendException
public Stream<RawQuery.Result<String>> queryStream(RawQuery query) throws BackendException
BackendException
public Long totals(RawQuery query) throws BackendException
BackendException
public void restore(Map<String,Map<String,List<IndexEntry>>> documents) throws BackendException
BackendException
public void commit() throws BackendException
BaseTransaction
BaseTransaction.rollback()
at most once per instance.commit
in interface BaseTransaction
BackendException
public void rollback() throws BackendException
BaseTransaction
BaseTransaction.commit()
at most once per instance.rollback
in interface BaseTransaction
BackendException
public void logMutations(DataOutput out)
logMutations
in interface LoggableTransaction
public void invalidate(String store)
Copyright © 2012–2023. All rights reserved.