org.apache.dubbo.common.URL.getPositiveParameter()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(87)

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

URL.getPositiveParameter介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-dubbo

public NettyCodecAdapter(Codec2 codec, URL url, org.apache.dubbo.remoting.ChannelHandler handler) {
  this.codec = codec;
  this.url = url;
  this.handler = handler;
  int b = url.getPositiveParameter(Constants.BUFFER_KEY, Constants.DEFAULT_BUFFER_SIZE);
  this.bufferSize = b >= Constants.MIN_BUFFER_SIZE && b <= Constants.MAX_BUFFER_SIZE ? b : Constants.DEFAULT_BUFFER_SIZE;
}

代码示例来源:origin: apache/incubator-dubbo

public GrizzlyCodecAdapter(Codec2 codec, URL url, ChannelHandler handler) {
  this.codec = codec;
  this.url = url;
  this.handler = handler;
  int b = url.getPositiveParameter(Constants.BUFFER_KEY, Constants.DEFAULT_BUFFER_SIZE);
  this.bufferSize = b >= Constants.MIN_BUFFER_SIZE && b <= Constants.MAX_BUFFER_SIZE ? b : Constants.DEFAULT_BUFFER_SIZE;
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public double getPositiveParameter(String key, double defaultValue) {
  return super.getPositiveParameter(key, defaultValue);
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public int getPositiveParameter(String key, int defaultValue) {
  return super.getPositiveParameter(key, defaultValue);
}

代码示例来源:origin: apache/incubator-dubbo

public MinaCodecAdapter(Codec2 codec, URL url, ChannelHandler handler) {
  this.codec = codec;
  this.url = url;
  this.handler = handler;
  int b = url.getPositiveParameter(Constants.BUFFER_KEY, Constants.DEFAULT_BUFFER_SIZE);
  this.bufferSize = b >= Constants.MIN_BUFFER_SIZE && b <= Constants.MAX_BUFFER_SIZE ? b : Constants.DEFAULT_BUFFER_SIZE;
}

代码示例来源:origin: apache/incubator-dubbo

public NettyCodecAdapter(Codec2 codec, URL url, org.apache.dubbo.remoting.ChannelHandler handler) {
  this.codec = codec;
  this.url = url;
  this.handler = handler;
  int b = url.getPositiveParameter(Constants.BUFFER_KEY, Constants.DEFAULT_BUFFER_SIZE);
  this.bufferSize = b >= Constants.MIN_BUFFER_SIZE && b <= Constants.MAX_BUFFER_SIZE ? b : Constants.DEFAULT_BUFFER_SIZE;
}

代码示例来源:origin: apache/incubator-dubbo

public GrizzlyCodecAdapter(Codec2 codec, URL url, ChannelHandler handler) {
  this.codec = codec;
  this.url = url;
  this.handler = handler;
  int b = url.getPositiveParameter(Constants.BUFFER_KEY, Constants.DEFAULT_BUFFER_SIZE);
  this.bufferSize = b >= Constants.MIN_BUFFER_SIZE && b <= Constants.MAX_BUFFER_SIZE ? b : Constants.DEFAULT_BUFFER_SIZE;
}

代码示例来源:origin: apache/incubator-dubbo

public MinaCodecAdapter(Codec2 codec, URL url, ChannelHandler handler) {
  this.codec = codec;
  this.url = url;
  this.handler = handler;
  int b = url.getPositiveParameter(Constants.BUFFER_KEY, Constants.DEFAULT_BUFFER_SIZE);
  this.bufferSize = b >= Constants.MIN_BUFFER_SIZE && b <= Constants.MAX_BUFFER_SIZE ? b : Constants.DEFAULT_BUFFER_SIZE;
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public short getPositiveParameter(String key, short defaultValue) {
  return super.getPositiveParameter(key, defaultValue);
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public int getPositiveParameter(String key, int defaultValue) {
  return super.getPositiveParameter(key, defaultValue);
}

代码示例来源:origin: apache/incubator-dubbo

/**
 * @see #getPositiveParameter(String, int)
 * @deprecated Replace to <code>getPositiveParameter(String, int)</code>
 */
@Deprecated
public int getPositiveIntParameter(String key, int defaultValue) {
  return getPositiveParameter(key, defaultValue);
}

代码示例来源:origin: apache/incubator-dubbo

/**
 * @see #getPositiveParameter(String, int)
 * @deprecated Replace to <code>getPositiveParameter(String, int)</code>
 */
@Deprecated
public int getPositiveIntParameter(String key, int defaultValue) {
  return getPositiveParameter(key, defaultValue);
}

代码示例来源:origin: apache/incubator-dubbo

public AbstractEndpoint(URL url, ChannelHandler handler) {
  super(url, handler);
  this.codec = getChannelCodec(url);
  this.timeout = url.getPositiveParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
  this.connectTimeout = url.getPositiveParameter(Constants.CONNECT_TIMEOUT_KEY, Constants.DEFAULT_CONNECT_TIMEOUT);
}

代码示例来源:origin: apache/incubator-dubbo

public AbstractEndpoint(URL url, ChannelHandler handler) {
  super(url, handler);
  this.codec = getChannelCodec(url);
  this.timeout = url.getPositiveParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
  this.connectTimeout = url.getPositiveParameter(Constants.CONNECT_TIMEOUT_KEY, Constants.DEFAULT_CONNECT_TIMEOUT);
}

代码示例来源:origin: apache/incubator-dubbo

private DefaultFuture(Channel channel, Request request, int timeout) {
  this.channel = channel;
  this.request = request;
  this.id = request.getId();
  this.timeout = timeout > 0 ? timeout : channel.getUrl().getPositiveParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
  // put into waiting map.
  FUTURES.put(id, this);
  CHANNELS.put(id, channel);
}

代码示例来源:origin: apache/incubator-dubbo

private DefaultFuture(Channel channel, Request request, int timeout) {
  this.channel = channel;
  this.request = request;
  this.id = request.getId();
  this.timeout = timeout > 0 ? timeout : channel.getUrl().getPositiveParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
  // put into waiting map.
  FUTURES.put(id, this);
  CHANNELS.put(id, channel);
}

代码示例来源:origin: apache/incubator-dubbo

public ConnectionOrderedChannelHandler(ChannelHandler handler, URL url) {
  super(handler, url);
  String threadName = url.getParameter(Constants.THREAD_NAME_KEY, Constants.DEFAULT_THREAD_NAME);
  connectionExecutor = new ThreadPoolExecutor(1, 1,
      0L, TimeUnit.MILLISECONDS,
      new LinkedBlockingQueue<Runnable>(url.getPositiveParameter(Constants.CONNECT_QUEUE_CAPACITY, Integer.MAX_VALUE)),
      new NamedThreadFactory(threadName, true),
      new AbortPolicyWithReport(threadName, url)
  );  // FIXME There's no place to release connectionExecutor!
  queuewarninglimit = url.getParameter(Constants.CONNECT_QUEUE_WARNING_SIZE, Constants.DEFAULT_CONNECT_QUEUE_WARNING_SIZE);
}

代码示例来源:origin: apache/incubator-dubbo

public ConnectionOrderedChannelHandler(ChannelHandler handler, URL url) {
  super(handler, url);
  String threadName = url.getParameter(Constants.THREAD_NAME_KEY, Constants.DEFAULT_THREAD_NAME);
  connectionExecutor = new ThreadPoolExecutor(1, 1,
      0L, TimeUnit.MILLISECONDS,
      new LinkedBlockingQueue<Runnable>(url.getPositiveParameter(Constants.CONNECT_QUEUE_CAPACITY, Integer.MAX_VALUE)),
      new NamedThreadFactory(threadName, true),
      new AbortPolicyWithReport(threadName, url)
  );  // FIXME There's no place to release connectionExecutor!
  queuewarninglimit = url.getParameter(Constants.CONNECT_QUEUE_WARNING_SIZE, Constants.DEFAULT_CONNECT_QUEUE_WARNING_SIZE);
}

代码示例来源:origin: apache/incubator-dubbo

@Override
protected void doConnect() throws Throwable {
  connection = transport.connect(getConnectAddress())
      .get(getUrl().getPositiveParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT), TimeUnit.MILLISECONDS);
}

代码示例来源:origin: apache/incubator-dubbo

@Override
protected void doConnect() throws Throwable {
  connection = transport.connect(getConnectAddress())
      .get(getUrl().getPositiveParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT), TimeUnit.MILLISECONDS);
}

相关文章

微信公众号

最新文章

更多