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


Java BackendTransaction类代码示例

本文整理汇总了Java中com.thinkaurelius.titan.diskstorage.BackendTransaction的典型用法代码示例。如果您正苦于以下问题:Java BackendTransaction类的具体用法?Java BackendTransaction怎么用?Java BackendTransaction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BackendTransaction类属于com.thinkaurelius.titan.diskstorage包,在下文中一共展示了BackendTransaction类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import com.thinkaurelius.titan.diskstorage.BackendTransaction; //导入依赖的package包/类
public List<EntryList> execute(final BackendTransaction tx) {
    int total = 0;
    List<EntryList> result = new ArrayList<EntryList>(4);
    for (KeySliceQuery ksq : queries) {
        EntryList next =tx.indexQuery(ksq.updateLimit(getLimit()-total));
        result.add(next);
        total+=next.size();
        if (total>=getLimit()) break;
    }
    return result;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:12,代码来源:MultiKeySliceQuery.java

示例2: FulgoraExecutor

import com.thinkaurelius.titan.diskstorage.BackendTransaction; //导入依赖的package包/类
FulgoraExecutor(final Map<String,FulgoraRelationQuery> queryDefs, final StandardTitanTx tx, final IDManager idManager,
                final int numProcessors, final String stateKey, final OLAPJob job,
                final StateInitializer<S> initializer, final FulgoraResult<S> initialState) {
    this.tx=tx;
    this.edgeSerializer = tx.getEdgeSerializer();
    this.stateKey = stateKey;
    this.job = job;
    this.initializer = initializer;
    BackendTransaction btx = tx.getTxHandle();
    this.idManager = idManager;
    this.queryDefinitions = queryDefs;
    this.numProcessors = numProcessors;

    int count = 0;
    for (FulgoraRelationQuery frq : queryDefs.values()) count+=frq.queries.size();
    numQueries = count+1;
    //Add one for grounding query, since the first (0th) query is the grounding/condition query
    dataQueues = new ArrayList<BlockingQueue<QueryResult>>(numQueries);
    pullThreads = new DataPuller[numQueries];

    int pos = 0;
    pullThreads[pos++]=addDataPuller(BaseKey.VertexExists.getName(),
            new SliceQuery(BufferUtil.zeroBuffer(4),BufferUtil.oneBuffer(4)).setLimit(1),btx);
    for (Map.Entry<String,FulgoraRelationQuery> queryDef : queryDefs.entrySet()) {
        String queryName = queryDef.getKey();
        List<SliceQuery> sqs = queryDef.getValue().queries;
        for (SliceQuery sq : sqs) {
            pullThreads[pos++]=addDataPuller(queryName,sq,btx);
        }
    }

    partitionedVertexMsgs = new ConcurrentHashMap<Long, MessageAccumulator>();
    vertexStates = initialState;
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:35,代码来源:FulgoraExecutor.java

示例3: addDataPuller

import com.thinkaurelius.titan.diskstorage.BackendTransaction; //导入依赖的package包/类
private final DataPuller addDataPuller(String queryName, SliceQuery sq, BackendTransaction btx) {
    BlockingQueue<QueryResult> queue = new LinkedBlockingQueue<QueryResult>(QUEUE_SIZE);
    dataQueues.add(queue);
    DataPuller dp = new DataPuller(idManager, queryName, queue, btx.edgeStoreKeys(sq));
    dp.start();
    return dp;
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:8,代码来源:FulgoraExecutor.java

示例4: setBackendTransaction

import com.thinkaurelius.titan.diskstorage.BackendTransaction; //导入依赖的package包/类
public void setBackendTransaction(BackendTransaction txHandle) {
    Preconditions.checkArgument(this.txHandle==null && txHandle!=null);
    this.txHandle = txHandle;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:5,代码来源:StandardTitanTx.java

示例5: getTxHandle

import com.thinkaurelius.titan.diskstorage.BackendTransaction; //导入依赖的package包/类
public BackendTransaction getTxHandle() {
    return txHandle;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:4,代码来源:StandardTitanTx.java


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