org.glassfish.grizzly.Connection.setMaxAsyncWriteQueueSize()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(147)

本文整理了Java中org.glassfish.grizzly.Connection.setMaxAsyncWriteQueueSize()方法的一些代码示例,展示了Connection.setMaxAsyncWriteQueueSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connection.setMaxAsyncWriteQueueSize()方法的具体详情如下:
包路径:org.glassfish.grizzly.Connection
类名称:Connection
方法名:setMaxAsyncWriteQueueSize

Connection.setMaxAsyncWriteQueueSize介绍

[英]Set the max size (in bytes) of asynchronous write queue associated with connection.
[中]设置与连接关联的异步写入队列的最大大小(字节)。

代码示例

代码示例来源:origin: com.ning/async-http-client

@Override
public void completed(WriteResult result) {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.completed(result);
  }
}

代码示例来源:origin: com.ning/async-http-client

@Override
public void cancelled() {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.cancelled();
  }
}

代码示例来源:origin: com.ning/async-http-client

@Override
public void failed(Throwable throwable) {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.failed(throwable);
  }
}

代码示例来源:origin: com.ning/async-http-client

@Override
public void onError(Throwable t) {
  c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes);
  c.closeWithReason(Exceptions.makeIOException(t));
}

代码示例来源:origin: com.ning/async-http-client

@Override
public void ready() {
  try {
    flush();
  } catch (IOException e) {
    final Connection c = feedableBodyGenerator.context.getConnection();
    c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes);
    c.closeWithReason(Exceptions.makeIOException(e));
  }
}

代码示例来源:origin: com.ning/async-http-client

synchronized void initializeAsynchronousTransfer(final FilterChainContext context,
                         final HttpRequestPacket requestPacket)
throws IOException {
  if (asyncTransferInitiated) {
    throw new IllegalStateException("Async transfer has already been initiated.");
  }
  if (feeder == null) {
    throw new IllegalStateException("No feeder available to perform the transfer.");
  }
  assert (context != null);
  assert (requestPacket != null);
  this.requestPacket = requestPacket;
  this.contentBuilder = HttpContent.builder(requestPacket);
  final Connection c = context.getConnection();
  origMaxPendingBytes = c.getMaxAsyncWriteQueueSize();
  if (configuredMaxPendingBytes != DEFAULT) {
    c.setMaxAsyncWriteQueueSize(configuredMaxPendingBytes);
  }
  this.context = context;
  asyncTransferInitiated = true;
  
  if (requestPacket.isSecure() &&
      (getSSLEngine(context.getConnection()) == null)) {
    flushOnSSLHandshakeComplete();
  } else {
    feederFlush(context.getConnection());
  }
}

代码示例来源:origin: org.apache.apex/apex-shaded-ning19

@Override
public void cancelled() {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.cancelled();
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client

@Override
public void completed(WriteResult result) {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.completed(result);
  }
}

代码示例来源:origin: io.gatling/async-http-client

@Override
public void completed(WriteResult result) {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.completed(result);
  }
}

代码示例来源:origin: io.gatling/async-http-client

@Override
public void failed(Throwable throwable) {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.failed(throwable);
  }
}

代码示例来源:origin: org.apache.apex/apex-shaded-ning19

@Override
public void failed(Throwable throwable) {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.failed(throwable);
  }
}

代码示例来源:origin: org.apache.apex/apex-shaded-ning19

@Override
public void completed(WriteResult result) {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.completed(result);
  }
}

代码示例来源:origin: io.gatling/async-http-client

@Override
public void cancelled() {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.cancelled();
  }
}

代码示例来源:origin: javaee/grizzly-ahc

@Override
public void failed(Throwable throwable) {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.failed(throwable);
  }
}

代码示例来源:origin: javaee/grizzly-ahc

@Override
public void cancelled() {
  c.setMaxAsyncWriteQueueSize(origMaxPendingBytes);
  if (delegate != null) {
    delegate.cancelled();
  }
}

代码示例来源:origin: org.apache.apex/apex-shaded-ning19

@Override
public void onError(Throwable t) {
  c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes);
  c.closeWithReason(Exceptions.makeIOException(t));
}

代码示例来源:origin: io.gatling/async-http-client

@Override
public void onError(Throwable t) {
  c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes);
  HttpTransactionContext.get(c).abort(t);
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client

@Override
public void onError(Throwable t) {
  c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes);
  c.closeWithReason(Exceptions.makeIOException(t));
}

代码示例来源:origin: javaee/grizzly-ahc

@Override
public void onError(Throwable t) {
  c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes);
  c.closeWithReason(Exceptions.makeIOException(t));
}

代码示例来源:origin: org.apache.apex/apex-shaded-ning19

@Override
public void ready() {
  try {
    flush();
  } catch (IOException e) {
    final Connection c = feedableBodyGenerator.context.getConnection();
    c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes);
    c.closeWithReason(Exceptions.makeIOException(e));
  }
}

相关文章