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
BackendException
public void add(String store, String docid, IndexEntry entry, boolean isNew)
public void register(String store, String key, KeyInformation information) throws BackendException
BackendException
public List<String> query(IndexQuery query) throws BackendException
BackendException
public Iterable<RawQuery.Result<String>> query(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
Copyright © 2012–2015. All rights reserved.