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


Java SerializingExecutor类代码示例

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


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

示例1: toStringMatches_noDeadline_default

import io.grpc.internal.SerializingExecutor; //导入依赖的package包/类
@Test
public void toStringMatches_noDeadline_default() {
  String actual = allSet
      .withDeadline(null)
      .withExecutor(new SerializingExecutor(directExecutor()))
      .withCallCredentials(null)
      .withMaxInboundMessageSize(44)
      .withMaxOutboundMessageSize(55)
      .toString();

  assertThat(actual).contains("deadline=null");
  assertThat(actual).contains("authority=authority");
  assertThat(actual).contains("callCredentials=null");
  assertThat(actual).contains("executor=class io.grpc.internal.SerializingExecutor");
  assertThat(actual).contains("compressorName=compressor");
  assertThat(actual).contains("customOptions=[[option1, value1], [option2, value2]]");
  assertThat(actual).contains("waitForReady=true");
  assertThat(actual).contains("maxInboundMessageSize=44");
  assertThat(actual).contains("maxOutboundMessageSize=55");
  assertThat(actual).contains("streamTracerFactories=[tracerFactory1, tracerFactory2]");
}
 
开发者ID:grpc,项目名称:grpc-java,代码行数:22,代码来源:CallOptionsTest.java

示例2: OkHttpClientTransport

import io.grpc.internal.SerializingExecutor; //导入依赖的package包/类
OkHttpClientTransport(InetSocketAddress address, String authority, @Nullable String userAgent,
    Executor executor, @Nullable SSLSocketFactory sslSocketFactory,
    @Nullable HostnameVerifier hostnameVerifier, ConnectionSpec connectionSpec,
    int maxMessageSize, @Nullable InetSocketAddress proxyAddress, @Nullable String proxyUsername,
    @Nullable String proxyPassword, Runnable tooManyPingsRunnable,
    TransportTracer transportTracer) {
  this.address = Preconditions.checkNotNull(address, "address");
  this.defaultAuthority = authority;
  this.maxMessageSize = maxMessageSize;
  this.executor = Preconditions.checkNotNull(executor, "executor");
  serializingExecutor = new SerializingExecutor(executor);
  // Client initiated streams are odd, server initiated ones are even. Server should not need to
  // use it. We start clients at 3 to avoid conflicting with HTTP negotiation.
  nextStreamId = 3;
  this.sslSocketFactory = sslSocketFactory;
  this.hostnameVerifier = hostnameVerifier;
  this.connectionSpec = Preconditions.checkNotNull(connectionSpec, "connectionSpec");
  this.stopwatchFactory = GrpcUtil.STOPWATCH_SUPPLIER;
  this.userAgent = GrpcUtil.getGrpcUserAgent("okhttp", userAgent);
  this.proxyAddress = proxyAddress;
  this.proxyUsername = proxyUsername;
  this.proxyPassword = proxyPassword;
  this.tooManyPingsRunnable =
      Preconditions.checkNotNull(tooManyPingsRunnable, "tooManyPingsRunnable");
  this.transportTracer = Preconditions.checkNotNull(transportTracer);
  initTransportTracer();
}
 
开发者ID:grpc,项目名称:grpc-java,代码行数:28,代码来源:OkHttpClientTransport.java

示例3: getSerializingExecutor

import io.grpc.internal.SerializingExecutor; //导入依赖的package包/类
/**
 * Get the shared executor.
 */
public static Executor getSerializingExecutor() {
    return new SerializingExecutor(executor);
}
 
开发者ID:salesforce,项目名称:reactive-grpc,代码行数:7,代码来源:ReactiveExecutor.java

示例4: AsyncFrameWriter

import io.grpc.internal.SerializingExecutor; //导入依赖的package包/类
public AsyncFrameWriter(OkHttpClientTransport transport, SerializingExecutor executor) {
  this.transport = transport;
  this.executor = executor;
}
 
开发者ID:grpc,项目名称:grpc-java,代码行数:5,代码来源:AsyncFrameWriter.java


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