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


Java ExecutionStrategy类代码示例

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


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

示例1: GraphQL

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
/**
 * A GraphQL object ready to execute queries
 *
 * @param graphQLSchema    the schema to use
 * @param queryStrategy    the query execution strategy to use
 * @param mutationStrategy the mutation execution strategy to use
 * @deprecated use the {@link #newAsyncGraphQL(GraphQLSchema)} builder instead.  This will be
 * removed in a future version.
 */
public GraphQL(GraphQLSchema graphQLSchema, ExecutionStrategy queryStrategy,
               ExecutionStrategy mutationStrategy) {
  super(graphQLSchema, queryStrategy, mutationStrategy);
  assert queryStrategy instanceof AsyncExecutionStrategy :
    "Async graphql requires an async query strategy";
  assert mutationStrategy instanceof AsyncExecutionStrategy  :
    "Async graphql requires an async mutation strategy";
  assert ((AsyncExecutionStrategy) mutationStrategy).isSerial() :
    "Async graphql requires a serial mutation strategy";
}
 
开发者ID:karthicks,项目名称:graphql-java-async,代码行数:20,代码来源:GraphQL.java

示例2: createQueryExecutionStrategy

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
protected ExecutionStrategy createQueryExecutionStrategy() {
    return createExecutionStrategy(
            processorProperties.getMinimumThreadPoolSizeQuery(),
            processorProperties.getMaximumThreadPoolSizeQuery(),
            processorProperties.getKeepAliveTimeInSecondsQuery(),
            "graphql-query-thread-"
    );
}
 
开发者ID:merapar,项目名称:graphql-spring-boot-starter,代码行数:9,代码来源:GraphQlExecutorImpl.java

示例3: createMutationExecutionStrategy

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
protected ExecutionStrategy createMutationExecutionStrategy() {
    return createExecutionStrategy(
            processorProperties.getMinimumThreadPoolSizeMutation(),
            processorProperties.getMaximumThreadPoolSizeMutation(),
            processorProperties.getKeepAliveTimeInSecondsMutation(),
            "graphql-mutation-thread-"
    );
}
 
开发者ID:merapar,项目名称:graphql-spring-boot-starter,代码行数:9,代码来源:GraphQlExecutorImpl.java

示例4: createSubscriptionExecutionStrategy

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
protected ExecutionStrategy createSubscriptionExecutionStrategy() {
    return createExecutionStrategy(
            processorProperties.getMinimumThreadPoolSizeSubscription(),
            processorProperties.getMaximumThreadPoolSizeSubscription(),
            processorProperties.getKeepAliveTimeInSecondsSubscription(),
            "graphql-subscription-thread-"
    );
}
 
开发者ID:merapar,项目名称:graphql-spring-boot-starter,代码行数:9,代码来源:GraphQlExecutorImpl.java

示例5: createExecutionStrategy

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
private ExecutionStrategy createExecutionStrategy(Integer minimumThreadPoolSize, Integer maximumThreadPoolSize, Integer keepAliveTimeInSeconds, String threadNamePrefix) {
    return new ExecutorServiceExecutionStrategy(new ThreadPoolExecutor(
            minimumThreadPoolSize,
            maximumThreadPoolSize,
            keepAliveTimeInSeconds,
            TimeUnit.SECONDS,
            new SynchronousQueue<>(),
            new CustomizableThreadFactory(threadNamePrefix),
            new ThreadPoolExecutor.CallerRunsPolicy())
    );
}
 
开发者ID:merapar,项目名称:graphql-spring-boot-starter,代码行数:12,代码来源:GraphQlExecutorImpl.java

示例6: getExecutionStrategy

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
@JsonProperty
public ExecutionStrategy getExecutionStrategy() {
    switch (executionStrategy) {
    case "batched":
        return new BatchedExecutionStrategy();
    case "async_serial":
        return new AsyncSerialExecutionStrategy();
    case "subscription":
        return new SubscriptionExecutionStrategy();
    case "async":
    default:
        return new AsyncExecutionStrategy();
    }
}
 
开发者ID:smoketurner,项目名称:dropwizard-graphql,代码行数:15,代码来源:GraphQLFactory.java

示例7: queryExecutionStrategy

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
public Builder queryExecutionStrategy(ExecutionStrategy executionStrategy) {
  assertNotNull(executionStrategy, "Query ExecutionStrategy must be non null");
  this.queryExecutionStrategy = executionStrategy;
  return this;
}
 
开发者ID:karthicks,项目名称:graphql-java-async,代码行数:6,代码来源:GraphQL.java

示例8: mutationExecutionStrategy

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
public Builder mutationExecutionStrategy(ExecutionStrategy executionStrategy) {
  assertNotNull(executionStrategy, "Mutation ExecutionStrategy must be non null");
  this.mutationExecutionStrategy = executionStrategy;
  return this;
}
 
开发者ID:karthicks,项目名称:graphql-java-async,代码行数:6,代码来源:GraphQL.java

示例9: getExecutionStrategy

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
public ExecutionStrategy getExecutionStrategy() {
    return delegate.getExecutionStrategy();
}
 
开发者ID:oembedler,项目名称:spring-graphql-common,代码行数:4,代码来源:GraphQLExecutionContext.java

示例10: setExecutionStrategy

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
public void setExecutionStrategy(ExecutionStrategy executionStrategy) {
    delegate.setExecutionStrategy(executionStrategy);
}
 
开发者ID:oembedler,项目名称:spring-graphql-common,代码行数:4,代码来源:GraphQLExecutionContext.java

示例11: GraphQLQueryExecutor

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
private GraphQLQueryExecutor(final GraphQLSchemaHolder graphQLSchemaHolder, final ExecutionStrategy executionStrategy) {
    Assert.notNull(graphQLSchemaHolder, "GraphQL Schema holder can not be null");
    this.graphQLSchemaHolder = graphQLSchemaHolder;
    this.executionStrategy = executionStrategy;
}
 
开发者ID:oembedler,项目名称:spring-graphql-common,代码行数:6,代码来源:GraphQLQueryExecutor.java

示例12: create

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
public static GraphQLQueryExecutor create(final GraphQLSchemaHolder graphQLSchemaHolder, final ExecutionStrategy executionStrategy) {
    return new GraphQLQueryExecutor(graphQLSchemaHolder, executionStrategy);
}
 
开发者ID:oembedler,项目名称:spring-graphql-common,代码行数:4,代码来源:GraphQLQueryExecutor.java

示例13: getStrategy

import graphql.execution.ExecutionStrategy; //导入依赖的package包/类
protected ExecutionStrategy getStrategy() {
    return new SimpleTraversalStrategy();
}
 
开发者ID:ChiralBehaviors,项目名称:Ultrastructure,代码行数:4,代码来源:PhantasmContext.java


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