當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。