当前位置: 首页>>代码示例>>Java>>正文


Java TransactionConfiguration类代码示例

本文整理汇总了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);
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:24,代码来源:Backend.java

示例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);
    }
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:12,代码来源:StandardTitanGraph.java

示例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);
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:13,代码来源:TransactionLogHeader.java


注:本文中的com.thinkaurelius.titan.graphdb.transaction.TransactionConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。