/** * Set the RSA public exponent below which a warning should result. * * @param length the RSA public exponent below which a warning should result */ public void setWarningBoundary(final long length) { Constraint.isGreaterThanOrEqual(0, length, "boundary value must not be negative"); warningBoundary = BigInteger.valueOf(length); }
/** * Set the RSA public exponent below which an error should result. * * @param length the RSA public exponent below which an error should result */ public void setErrorBoundary(final long length) { Constraint.isGreaterThanOrEqual(0, length, "boundary value must not be negative"); errorBoundary = BigInteger.valueOf(length); }
/** Set the search timeout. * @param timeout search timeout */ public void setTimeOut(@Nonnull final int timeout) { setQueryTimeout((int) Constraint.isGreaterThanOrEqual(0, timeout, "Query timeout must be greater than zero")); }
/** * Sets the number of times a transaction will be retried. * * @param retry number of transaction retries */ public void setTransactionRetry(final int retry) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); transactionRetry = (int) Constraint.isGreaterThanOrEqual(0, retry, "Transaction retry must be greater than or equal to zero"); }
/** * Constructor. * * @param query to search the database * @param timeout search timeout * @deprecated - use the property setters */ @Deprecated public FormatExecutableStatementBuilder(@Nonnull final String query, @Nonnull final int timeout) { DeprecationSupport.warn(ObjectType.METHOD, "FormatExecutableStatementBuilder(String, int)", null, null); sqlQuery = Constraint.isNotNull(query, "SQL query can not be null"); setQueryTimeout((int) Constraint.isGreaterThanOrEqual(0, timeout, "Query timeout must be greater than zero")); }
/** * Set the number of retries to attempt for a failed transaction. Defaults to 3. * * @param retries the number of retries */ public void setTransactionRetries(@NonNegative final int retries) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); transactionRetry = (int) Constraint.isGreaterThanOrEqual(0, retries, "Timeout must be greater than or equal to 0"); }
/** * Constructor. * * @param offset milliseconds to subtract from record expiration to establish session expiration value */ protected AbstractSPSessionSerializer(@Duration @NonNegative final long offset) { expirationOffset = Constraint.isGreaterThanOrEqual(0, offset, "Offset must be greater than or equal to zero"); }
/** * Set duration in milliseconds since an {@link AuthenticationResult} was created that * allows it to be reused for this request. * * <p>Set to zero to apply no constraint.</p> * * @param age duration in milliseconds, or zero * * @return this context * * @since 3.4.0 */ @Nonnull public AuthenticationContext setMaxAge(@NonNegative @Duration final long age) { maxAge = Constraint.isGreaterThanOrEqual(0, age, "MaxAge cannot be negative"); return this; }
/** * Set the cleanup interval in milliseconds, or 0 for none. * * @param interval cleanup interval in milliseconds */ @Duration public void setCleanupInterval(@Duration @NonNegative final long interval) { cleanupInterval = Constraint.isGreaterThanOrEqual(0, interval, "Cleanup interval must be non-negative"); }
/** * Set time in milliseconds to expire consent storage records. * * @param consentLifetime time in milliseconds to expire consent storage records */ public void setLifetime(@Nonnull @Duration @NonNegative final Long consentLifetime) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); Constraint.isNotNull(consentLifetime, "Lifetime cannot be null"); lifetime = Constraint.isGreaterThanOrEqual(0, consentLifetime, "Lifetime must be greater than or equal to 0"); }
/** * Set the default assertion lifetime in milliseconds. * * @param lifetime default lifetime in milliseconds */ @Duration public void setDefaultAssertionLifetime(@Duration @NonNegative final long lifetime) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); defaultAssertionLifetime = Constraint.isGreaterThanOrEqual(0, lifetime, "Default assertion lifetime must be greater than or equal to 0"); }
/** * Set the amount of time in milliseconds to defer expiration of records. * * @param slop the policy to set */ @Duration public void setSessionSlop(@Duration @NonNegative final long slop) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); sessionSlop = Constraint.isGreaterThanOrEqual(0, slop, "Slop must be greater than or equal to zero"); }
/** * Set time in milliseconds to expire consent storage records. * * @param consentLifetime time in milliseconds to expire consent storage records */ @Duration public void setLifetime(@Nonnull @Duration @NonNegative final Long consentLifetime) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); Constraint.isNotNull(consentLifetime, "Lifetime cannot be null"); lifetime = Constraint.isGreaterThanOrEqual(0, consentLifetime, "Lifetime must be greater than or equal to 0"); }
/** * Sets the amount of time, in milliseconds, for which a message is valid. * * @param lifetime amount of time, in milliseconds, for which a message is valid */ @Duration public synchronized void setMessageLifetime(@Duration @NonNegative final long lifetime) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); messageLifetime = Constraint.isGreaterThanOrEqual(0, lifetime, "Message lifetime must be greater than or equal to 0"); }
/** * Set the SQL query timeout. * * @param timeout the timeout to set in milliseconds */ @Duration public void setQueryTimeout(@Duration @NonNegative final long timeout) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); queryTimeout = Constraint.isGreaterThanOrEqual(0, timeout, "Timeout must be greater than or equal to 0"); }
/** * Set the maximum amount of time in milliseconds, since first usage, a flow should be considered active. A value * of 0 indicates that there is no upper limit on the lifetime on an active flow. * * @param flowLifetime the lifetime for the flow, must be 0 or greater */ @Duration public void setLifetime(@Duration @NonNegative final long flowLifetime) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); lifetime = Constraint.isGreaterThanOrEqual(0, flowLifetime, "Lifetime must be greater than or equal to 0"); }
/** * Set the clock skew. * * @param skew clock skew to set */ @Duration public void setClockSkew(@Duration @NonNegative final long skew) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); clockSkew = Constraint.isGreaterThanOrEqual(0, skew, "Clock skew must be greater than or equal to 0"); }
/** * Sets the lifetime in seconds of replay entries. * * @param exp lifetime in seconds of entries */ @Duration public void setExpires(@Duration @NonNegative final long exp) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); expires = Constraint.isGreaterThanOrEqual(0, exp, "Expiration must be greater than or equal to 0"); }
/** * Set the SQL query timeout. Defaults to 5000. * * @param timeout the timeout to set in milliseconds */ @Duration public void setQueryTimeout(@Duration @NonNegative final long timeout) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); queryTimeout = Constraint.isGreaterThanOrEqual(0, timeout, "Timeout must be greater than or equal to 0"); }
/** * Sets the number of milliseconds between one cleanup and another. A value of 0 indicates that no cleanup will be * performed. * * This setting cannot be changed after the service has been initialized. * * @param interval number of milliseconds between one cleanup and another */ @Duration public void setCleanupInterval(@Duration @NonNegative final long interval) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); cleanupInterval = Constraint.isGreaterThanOrEqual(0, interval, "Cleanup interval must be greater than or equal to zero"); }