當前位置: 首頁>>代碼示例>>Java>>正文


Java BackendQueryHolder類代碼示例

本文整理匯總了Java中com.thinkaurelius.titan.graphdb.query.BackendQueryHolder的典型用法代碼示例。如果您正苦於以下問題:Java BackendQueryHolder類的具體用法?Java BackendQueryHolder怎麽用?Java BackendQueryHolder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BackendQueryHolder類屬於com.thinkaurelius.titan.graphdb.query包,在下文中一共展示了BackendQueryHolder類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: execute

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
protected<Q> Q execute(RelationCategory returnType, ResultConstructor<Q> resultConstructor) {
    BaseVertexCentricQuery bq = super.constructQuery(returnType);
    if (bq.isEmpty()) return resultConstructor.emptyResult();
    if (returnType==RelationCategory.PROPERTY && hasSingleType() && !hasQueryOnlyLoaded()
            && tx.getConfiguration().hasPropertyPrefetching()) {
        //Preload properties
        vertex.query().properties().iterator().hasNext();
    }

    if (isPartitionedVertex(vertex) && !hasQueryOnlyGivenVertex()) { //If it's a preloaded vertex we shouldn't preload data explicitly
        List<InternalVertex> vertices = allRequiredRepresentatives(vertex);
        profiler.setAnnotation(QueryProfiler.PARTITIONED_VERTEX_ANNOTATION,true);
        profiler.setAnnotation(QueryProfiler.NUMVERTICES_ANNOTATION,vertices.size());
        if (vertices.size()>1) {
            for (BackendQueryHolder<SliceQuery> sq : bq.getQueries()) {
                tx.executeMultiQuery(vertices, sq.getBackendQuery(),sq.getProfiler());
            }
        }
    } else profiler.setAnnotation(QueryProfiler.NUMVERTICES_ANNOTATION,1);
    return resultConstructor.getResult(vertex,bq);
}
 
開發者ID:graben1437,項目名稱:titan1withtp3.1,代碼行數:22,代碼來源:VertexCentricQueryBuilder.java

示例2: relations

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
private List<SliceQuery> relations(RelationCategory returnType) {
    if (name==null) {
        if (hasSingleType()) name = getSingleType().getName();
        else throw new IllegalStateException("Need to specify an explicit name for this query");
    }
    try {
        BaseVertexCentricQuery vq = super.constructQuery(returnType);
        List<SliceQuery> queries = new ArrayList<SliceQuery>(vq.numSubQueries());
        for (int i = 0; i < vq.numSubQueries(); i++) {
            BackendQueryHolder<SliceQuery> bq = vq.getSubQuery(i);
            SliceQuery sq = bq.getBackendQuery();
            queries.add(sq.updateLimit(bq.isFitted() ? vq.getLimit() : hardQueryLimit));
        }
        return queries;
    } finally {
        tx.rollback();
    }
}
 
開發者ID:graben1437,項目名稱:titan0.5.4-hbase1.1.1-custom,代碼行數:19,代碼來源:FulgoraBuilder.java

示例3: BaseVertexCentricQuery

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
public BaseVertexCentricQuery(Condition<TitanRelation> condition, Direction direction,
                              List<BackendQueryHolder<SliceQuery>> queries, OrderList orders,
                              int limit) {
    super(limit);
    Preconditions.checkArgument(condition != null && queries != null && direction != null);
    Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition) && limit>=0);
    this.condition = condition;
    this.queries = queries;
    this.orders = orders;
    this.direction=direction;
}
 
開發者ID:graben1437,項目名稱:titan1withtp3.1,代碼行數:12,代碼來源:BaseVertexCentricQuery.java

示例4: SimpleVertexQueryProcessor

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
public SimpleVertexQueryProcessor(VertexCentricQuery query, StandardTitanTx tx) {
    Preconditions.checkArgument(query.isSimple());
    this.query=query;
    this.tx=tx;
    BackendQueryHolder<SliceQuery> bqh = query.getSubQuery(0);
    this.sliceQuery=bqh.getBackendQuery();
    this.profiler=bqh.getProfiler();
    this.vertex=query.getVertex();
    this.edgeSerializer=tx.getEdgeSerializer();
}
 
開發者ID:graben1437,項目名稱:titan1withtp3.1,代碼行數:11,代碼來源:SimpleVertexQueryProcessor.java

示例5: VertexCentricQuery

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
public VertexCentricQuery(InternalVertex vertex, Condition<TitanRelation> condition,
                          Direction direction,
                          List<BackendQueryHolder<SliceQuery>> queries,
                          OrderList orders,
                          int limit) {
    super(condition, direction, queries, orders, limit);
    Preconditions.checkNotNull(vertex);
    this.vertex = vertex;
}
 
開發者ID:graben1437,項目名稱:titan1withtp3.1,代碼行數:10,代碼來源:VertexCentricQuery.java

示例6: GraphCentricQuery

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
public GraphCentricQuery(ElementCategory resultType, Condition<TitanElement> condition, OrderList orders,
                         BackendQueryHolder<JointIndexQuery> indexQuery, int limit) {
    super(limit);
    Preconditions.checkNotNull(condition);
    Preconditions.checkArgument(orders != null && orders.isImmutable());
    Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition));
    Preconditions.checkNotNull(resultType);
    Preconditions.checkNotNull(indexQuery);
    this.condition = condition;
    this.orders = orders;
    this.resultType = resultType;
    this.indexQuery = indexQuery;
}
 
開發者ID:graben1437,項目名稱:titan1withtp3.1,代碼行數:14,代碼來源:GraphCentricQuery.java

示例7: execute

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
protected<Q> Q execute(RelationCategory returnType, ResultConstructor<Q> resultConstructor) {
    BaseVertexCentricQuery bq = super.constructQuery(returnType);
    if (bq.isEmpty()) return resultConstructor.emptyResult();
    if (isPartitionedVertex(vertex)) {
        List<InternalVertex> vertices = allRepresentatives(vertex);
        if (vertices.size()>1) {
            for (BackendQueryHolder<SliceQuery> sq : bq.getQueries()) {
                tx.executeMultiQuery(vertices, sq.getBackendQuery());
            }
        }
    }
    return resultConstructor.getResult(vertex,bq);
}
 
開發者ID:graben1437,項目名稱:titan0.5.4-hbase1.1.1-custom,代碼行數:14,代碼來源:VertexCentricQueryBuilder.java

示例8: getQueries

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
protected List<BackendQueryHolder<SliceQuery>> getQueries() {
    return queries;
}
 
開發者ID:graben1437,項目名稱:titan1withtp3.1,代碼行數:4,代碼來源:BaseVertexCentricQuery.java

示例9: getSubQuery

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
public BackendQueryHolder<SliceQuery> getSubQuery(int position) {
    return queries.get(position);
}
 
開發者ID:graben1437,項目名稱:titan1withtp3.1,代碼行數:4,代碼來源:BaseVertexCentricQuery.java

示例10: emptyQuery

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
public static final GraphCentricQuery emptyQuery(ElementCategory resultType) {
    Condition<TitanElement> cond = new FixedCondition<TitanElement>(false);
    return new GraphCentricQuery(resultType, cond, OrderList.NO_ORDER,
            new BackendQueryHolder<JointIndexQuery>(new JointIndexQuery(),
                    true, false), 0);
}
 
開發者ID:graben1437,項目名稱:titan1withtp3.1,代碼行數:7,代碼來源:GraphCentricQuery.java

示例11: getSubQuery

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
@Override
public BackendQueryHolder<JointIndexQuery> getSubQuery(int position) {
    if (position == 0) return indexQuery;
    else throw new IndexOutOfBoundsException();
}
 
開發者ID:graben1437,項目名稱:titan1withtp3.1,代碼行數:6,代碼來源:GraphCentricQuery.java

示例12: emptyQuery

import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //導入依賴的package包/類
public static final GraphCentricQuery emptyQuery(ElementCategory resultType) {
    Condition<TitanElement> cond = new FixedCondition<TitanElement>(false);
    return new GraphCentricQuery(resultType, cond, OrderList.NO_ORDER,
            new BackendQueryHolder<JointIndexQuery>(new JointIndexQuery(),
                    true, false, null), 0);
}
 
開發者ID:graben1437,項目名稱:titan0.5.4-hbase1.1.1-custom,代碼行數:7,代碼來源:GraphCentricQuery.java


注:本文中的com.thinkaurelius.titan.graphdb.query.BackendQueryHolder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。