org.wildfly.common.Assert.checkMinimumParameter()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(134)

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

Assert.checkMinimumParameter介绍

[英]Check that the named parameter is greater than or equal to min.
[中]检查命名参数是否大于或等于min。

代码示例

代码示例来源:origin: wildfly/wildfly

public ConnectionBuilder setWriteTimeout(final int writeTimeout) {
  Assert.checkMinimumParameter("writeTimeout", 1L, writeTimeout);
  this.writeTimeout = writeTimeout;
  return this;
}

代码示例来源:origin: wildfly/wildfly

public AttributeMapper(int index, String name) {
  Assert.checkMinimumParameter("index", 1, index);
  this.index = index;
  this.name = name;
}

代码示例来源:origin: wildfly/wildfly

public Builder setMaximumConnectedClusterNodes(final int maximumConnectedClusterNodes) {
  Assert.checkMinimumParameter("maximumConnectedClusterNodes", 0, maximumConnectedClusterNodes);
  this.maximumConnectedClusterNodes = maximumConnectedClusterNodes;
  return this;
}

代码示例来源:origin: wildfly/wildfly

public ConnectionBuilder setHeartbeatInterval(final int heartbeatInterval) {
  Assert.checkMinimumParameter("heartbeatInterval", 1, heartbeatInterval);
  this.heartbeatInterval = heartbeatInterval;
  return this;
}

代码示例来源:origin: wildfly/wildfly

/**
 * Set the stale transaction time, in seconds.  The time must be no less than one second.
 *
 * @param staleTransactionTime the stale transaction time, in seconds
 */
public Builder setStaleTransactionTime(final int staleTransactionTime) {
  Assert.checkMinimumParameter("staleTransactionTime", 1, staleTransactionTime);
  this.staleTransactionTime = staleTransactionTime;
  return this;
}

代码示例来源:origin: wildfly/wildfly

public Builder setWorkerStackSize(final long workerStackSize) {
  Assert.checkMinimumParameter("workerStackSize", 0, workerStackSize);
  this.workerStackSize = workerStackSize;
  return this;
}

代码示例来源:origin: wildfly/wildfly

/**
 * Construct a new instance.
 *
 * @param skipCerts the number of additional non-self-issued certificates that may appear in the path before {@code anyPolicy} is no longer permitted (must be >= 0)
 */
public InhibitAnyPolicyExtension(final int skipCerts) {
  super(true);
  Assert.checkMinimumParameter("skipCerts", 0, skipCerts);
  this.skipCerts = skipCerts;
}

代码示例来源:origin: wildfly/wildfly

public Builder setMaximumConnectedNodes(final long maximumConnectedNodes) {
  Assert.checkMinimumParameter("maximumConnectedNodes", 0, maximumConnectedNodes);
  this.maximumConnectedNodes = maximumConnectedNodes;
  return this;
}

代码示例来源:origin: wildfly/wildfly

public ConnectionBuilder setReadTimeout(final int readTimeout) {
  Assert.checkMinimumParameter("readTimeout", 1L, readTimeout);
  this.readTimeout = readTimeout;
  return this;
}

代码示例来源:origin: wildfly/wildfly

public Builder setMaxWorkerPoolSize(final int maxWorkerPoolSize) {
  Assert.checkMinimumParameter("maxWorkerPoolSize", 0, maxWorkerPoolSize);
  this.maxWorkerPoolSize = maxWorkerPoolSize;
  return this;
}

代码示例来源:origin: wildfly/wildfly

public Builder setWorkerKeepAlive(final int workerKeepAlive) {
  Assert.checkMinimumParameter("workerKeepAlive", 0, workerKeepAlive);
  this.workerKeepAlive = workerKeepAlive;
  return this;
}

代码示例来源:origin: wildfly/wildfly

public Builder setWorkerIoThreads(final int workerIoThreads) {
  Assert.checkMinimumParameter("workerIoThreads", 0, workerIoThreads);
  this.workerIoThreads = workerIoThreads;
  return this;
}

代码示例来源:origin: wildfly/wildfly

/**
 * Set recursive search of filtered attribute (for recursive roles assignment and similar)
 * @param roleRecursionDepth maximum depth of recursion, 0 by default (no recursion)
 * @return this builder
 */
public Builder roleRecursion(int roleRecursionDepth) {
  Assert.checkMinimumParameter("roleRecursionDepth", 0, roleRecursionDepth);
  this.roleRecursionDepth = roleRecursionDepth;
  return this;
}

代码示例来源:origin: wildfly/wildfly

public Builder setConnectTimeoutMilliseconds(final long connectTimeoutMilliseconds) {
  Assert.checkMinimumParameter("connectTimeoutMilliseconds", -1L, connectTimeoutMilliseconds);
  this.connectTimeoutMilliseconds = connectTimeoutMilliseconds;
  return this;
}

代码示例来源:origin: wildfly/wildfly

public void setMaxThreads(final int newSize) {
  Assert.checkMinimumParameter("newSize", 1, newSize);
  final Lock lock = this.lock;
  lock.lock();
  try {
    maxThreads = newSize;
  } finally {
    lock.unlock();
  }
}

代码示例来源:origin: wildfly/wildfly

public MessageTracker(final Channel channel, final int limit) {
  Assert.checkNotNullParam("channel", channel);
  Assert.checkMinimumParameter("limit", 1, limit);
  this.channel = channel;
  counter = limit;
}

代码示例来源:origin: wildfly/wildfly

/**
 * Set the certificate version.
 *
 * @param version the certificate version (must be between 1 and 3, inclusive)
 * @return this builder instance
 */
public X509CertificateBuilder setVersion(final int version) {
  Assert.checkMinimumParameter("version", 1, version);
  Assert.checkMaximumParameter("version", 3, version);
  this.version = version;
  return this;
}

代码示例来源:origin: wildfly/wildfly

private MaskedPasswordImpl(final String algorithm, final char[] initialKeyMaterial, final int iterationCount, final byte[] salt, final byte[] maskedPasswordBytes, final boolean validated) throws InvalidKeySpecException {
  Assert.checkMinimumParameter("iterationCount", 1, iterationCount);
  // perform an unmask to validate parameters
  if (! validated) unmask(algorithm, initialKeyMaterial, iterationCount, salt, maskedPasswordBytes);
  this.algorithm = algorithm;
  this.initialKeyMaterial = initialKeyMaterial;
  this.iterationCount = iterationCount;
  this.salt = salt;
  this.maskedPasswordBytes = maskedPasswordBytes;
}

代码示例来源:origin: wildfly/wildfly

/**
 * Get the canonical name for an index.  If the index is out of range, an exception is thrown.
 *
 * @param index the index to seek
 * @return the canonical name (not {@code null})
 */
public String nameOf(int index) {
  final Data[] byId = this.byId;
  Assert.checkMinimumParameter("index", 0, index);
  Assert.checkMaximumParameter("index", size() - 1, index);
  return byId[index].canonicalName;
}

代码示例来源:origin: wildfly/wildfly

/**
 * Get an item from this mapping by ID.
 *
 * @param index the index to look up
 * @return the mapped item for the given ID
 * @throws IllegalArgumentException if the given index is out of range
 */
public T getItemById(int index) throws IllegalArgumentException {
  Assert.checkMinimumParameter("index", 0, index);
  Assert.checkMaximumParameter("index", stringEnumeration.size() - 1, index);
  return items[index];
}

相关文章