当前位置: 首页>>代码示例>>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;未经允许,请勿转载。