public ConnectionBuilder setWriteTimeout(final int writeTimeout) { Assert.checkMinimumParameter("writeTimeout", 1L, writeTimeout); this.writeTimeout = writeTimeout; return this; }
public AttributeMapper(int index, String name) { Assert.checkMinimumParameter("index", 1, index); this.index = index; this.name = name; }
public Builder setMaximumConnectedClusterNodes(final int maximumConnectedClusterNodes) { Assert.checkMinimumParameter("maximumConnectedClusterNodes", 0, maximumConnectedClusterNodes); this.maximumConnectedClusterNodes = maximumConnectedClusterNodes; return this; }
public ConnectionBuilder setHeartbeatInterval(final int heartbeatInterval) { Assert.checkMinimumParameter("heartbeatInterval", 1, heartbeatInterval); this.heartbeatInterval = heartbeatInterval; return this; }
/** * 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; }
public Builder setWorkerStackSize(final long workerStackSize) { Assert.checkMinimumParameter("workerStackSize", 0, workerStackSize); this.workerStackSize = workerStackSize; return this; }
/** * 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; }
public Builder setMaximumConnectedNodes(final long maximumConnectedNodes) { Assert.checkMinimumParameter("maximumConnectedNodes", 0, maximumConnectedNodes); this.maximumConnectedNodes = maximumConnectedNodes; return this; }
public ConnectionBuilder setReadTimeout(final int readTimeout) { Assert.checkMinimumParameter("readTimeout", 1L, readTimeout); this.readTimeout = readTimeout; return this; }
public Builder setMaxWorkerPoolSize(final int maxWorkerPoolSize) { Assert.checkMinimumParameter("maxWorkerPoolSize", 0, maxWorkerPoolSize); this.maxWorkerPoolSize = maxWorkerPoolSize; return this; }
public Builder setWorkerKeepAlive(final int workerKeepAlive) { Assert.checkMinimumParameter("workerKeepAlive", 0, workerKeepAlive); this.workerKeepAlive = workerKeepAlive; return this; }
public Builder setWorkerIoThreads(final int workerIoThreads) { Assert.checkMinimumParameter("workerIoThreads", 0, workerIoThreads); this.workerIoThreads = workerIoThreads; return this; }
/** * 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; }
public Builder setConnectTimeoutMilliseconds(final long connectTimeoutMilliseconds) { Assert.checkMinimumParameter("connectTimeoutMilliseconds", -1L, connectTimeoutMilliseconds); this.connectTimeoutMilliseconds = connectTimeoutMilliseconds; return this; }
public void setMaxThreads(final int newSize) { Assert.checkMinimumParameter("newSize", 1, newSize); final Lock lock = this.lock; lock.lock(); try { maxThreads = newSize; } finally { lock.unlock(); } }
public MessageTracker(final Channel channel, final int limit) { Assert.checkNotNullParam("channel", channel); Assert.checkMinimumParameter("limit", 1, limit); this.channel = channel; counter = limit; }
/** * 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; }
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; }
/** * 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; }
/** * 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]; }