public class IndexTransaction extends Object implements BaseTransaction, LoggableTransaction
IndexProvider methods.| Constructor and Description |
|---|
IndexTransaction(IndexProvider index,
KeyInformation.IndexRetriever keyInformations,
BaseTransactionConfig config,
java.time.Duration maxWriteTime) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String store,
String docid,
IndexEntry entry,
boolean isNew) |
void |
add(String store,
String docid,
String key,
Object value,
boolean isNew) |
void |
commit()
Commits the transaction and persists all modifications to the backend.
|
void |
delete(String store,
String docid,
String key,
Object value,
boolean deleteAll) |
void |
logMutations(DataOutput out) |
List<String> |
query(IndexQuery query) |
Iterable<RawQuery.Result<String>> |
query(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.
|
public IndexTransaction(IndexProvider index, KeyInformation.IndexRetriever keyInformations, BaseTransactionConfig config, java.time.Duration maxWriteTime) throws BackendException
BackendExceptionpublic void add(String store, String docid, IndexEntry entry, boolean isNew)
public void register(String store, String key, KeyInformation information) throws BackendException
BackendExceptionpublic List<String> query(IndexQuery query) throws BackendException
BackendExceptionpublic Iterable<RawQuery.Result<String>> query(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 LoggableTransactionCopyright © 2012–2015. All rights reserved.