本文整理汇总了Java中com.thinkaurelius.titan.graphdb.transaction.TransactionConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java TransactionConfiguration类的具体用法?Java TransactionConfiguration怎么用?Java TransactionConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TransactionConfiguration类属于com.thinkaurelius.titan.graphdb.transaction包,在下文中一共展示了TransactionConfiguration类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: beginTransaction
import com.thinkaurelius.titan.graphdb.transaction.TransactionConfiguration; //导入依赖的package包/类
/**
* Opens a new transaction against all registered backend system wrapped in one {@link BackendTransaction}.
*
* @return
* @throws BackendException
*/
public BackendTransaction beginTransaction(TransactionConfiguration configuration, KeyInformation.Retriever indexKeyRetriever) throws BackendException {
StoreTransaction tx = storeManagerLocking.beginTransaction(configuration);
// Cache
CacheTransaction cacheTx = new CacheTransaction(tx, storeManagerLocking, bufferSize, maxWriteTime, configuration.hasEnabledBatchLoading());
// Index transactions
Map<String, IndexTransaction> indexTx = new HashMap<String, IndexTransaction>(indexes.size());
for (Map.Entry<String, IndexProvider> entry : indexes.entrySet()) {
indexTx.put(entry.getKey(), new IndexTransaction(entry.getValue(), indexKeyRetriever.get(entry.getKey()), configuration, maxWriteTime));
}
return new BackendTransaction(cacheTx, configuration, storeFeatures,
edgeStore, indexStore, txLogStore,
maxReadTime, indexTx, threadPool);
}
示例2: newTransaction
import com.thinkaurelius.titan.graphdb.transaction.TransactionConfiguration; //导入依赖的package包/类
public StandardTitanTx newTransaction(final TransactionConfiguration configuration) {
if (!isOpen) ExceptionFactory.graphShutdown();
try {
StandardTitanTx tx = new StandardTitanTx(this, configuration);
tx.setBackendTransaction(openBackendTransaction(tx));
openTransactions.add(tx);
return tx;
} catch (BackendException e) {
throw new TitanException("Could not start new transaction", e);
}
}
示例3: serializeHeader
import com.thinkaurelius.titan.graphdb.transaction.TransactionConfiguration; //导入依赖的package包/类
private DataOutput serializeHeader(Serializer serializer, int capacity, LogTxStatus status, TransactionConfiguration txConfig) {
EnumMap<LogTxMeta,Object> metaMap = new EnumMap<LogTxMeta, Object>(LogTxMeta.class);
if (txConfig!=null) {
for (LogTxMeta meta : LogTxMeta.values()) {
Object value = meta.getValue(txConfig);
if (value!=null) {
metaMap.put(meta,value);
}
}
}
return serializeHeader(serializer,capacity,status,metaMap);
}