public class IndexTransaction extends Object implements BaseTransaction, LoggableTransaction
IndexProvider methods.| Constructor and Description |
|---|
IndexTransaction(IndexProvider index,
KeyInformation.IndexRetriever keyInformations,
BaseTransactionConfig config,
Duration maxWriteTime) |
| Modifier and Type | Method and Description |
|---|---|
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 |
rollback()
Aborts (or rolls back) the transaction.
|
public IndexTransaction(IndexProvider index, KeyInformation.IndexRetriever keyInformations, BaseTransactionConfig config, Duration maxWriteTime) throws StorageException
StorageExceptionpublic void register(String store, String key, KeyInformation information) throws StorageException
StorageExceptionpublic List<String> query(IndexQuery query) throws StorageException
StorageExceptionpublic Iterable<RawQuery.Result<String>> query(RawQuery query) throws StorageException
StorageExceptionpublic void commit()
throws StorageException
BaseTransactionBaseTransaction.rollback() at most once per instance.commit in interface BaseTransactionStorageExceptionpublic void rollback()
throws StorageException
BaseTransactionBaseTransaction.commit() at most once per instance.rollback in interface BaseTransactionStorageExceptionpublic void logMutations(DataOutput out)
logMutations in interface LoggableTransactionCopyright © 2012–2014. All rights reserved.