decide which retry delay polciy will be configured based into the configured properties

@param properties the backend retry properties
@param builder    the retry config builder
175003
private void configureRetryIntervalFunction(BackendProperties properties, RetryConfig.Builder<Object> builder) {
		if (properties.getWaitDuration() != 0) {
			long waitDuration = properties.getWaitDuration();
			if (properties.getEnableExponentialBackoff()) {
				if (properties.getExponentialBackoffMultiplier() != 0) {
					builder.intervalFunction(IntervalFunction.ofExponentialBackoff(waitDuration, properties.getExponentialBackoffMultiplier()));
				} else {
					builder.intervalFunction(IntervalFunction.ofExponentialBackoff(properties.getWaitDuration()));
				}
			} else if (properties.getEnableRandomizedWait()) {
				if (properties.getRandomizedWaitFactor() != 0) {
					builder.intervalFunction(IntervalFunction.ofRandomized(waitDuration, properties.getRandomizedWaitFactor()));
				} else {
					builder.intervalFunction(IntervalFunction.ofRandomized(waitDuration));
				}
			} else {
				builder.waitDuration(Duration.ofMillis(properties.getWaitDuration()));
			}
		}
	}
241271
public static void rebindCasConfigurationProperties(final ConfigurationPropertiesBindingPostProcessor binder,
                                                        final ApplicationContext applicationContext) {

        val map = applicationContext.getBeansOfType(CasConfigurationProperties.class);
        val name = map.keySet().iterator().next();
        LOGGER.trace("Reloading CAS configuration via [{}]", name);
        val e = applicationContext.getBean(name);
        binder.postProcessBeforeInitialization(e, name);
        val bean = applicationContext.getAutowireCapableBeanFactory().initializeBean(e, name);
        applicationContext.getAutowireCapableBeanFactory().autowireBean(bean);
        LOGGER.debug("Reloaded CAS configuration [{}]", name);
    }
799746
private static void buildReadRowsSettings(Builder builder, BigtableOptions options) {
    RetryOptions retryOptions = options.getRetryOptions();
    CallOptionsConfig callOptions = options.getCallOptionsConfig();
    RetrySettings.Builder retryBuilder = builder.readRowsSettings().getRetrySettings().toBuilder();

    //Timeout for ReadRows
    Duration rpcTimeout = ofMillis(retryOptions.getReadPartialRowTimeoutMillis());
    Duration totalTimeout = ofMillis(callOptions.isUseTimeout()
        ? callOptions.getLongRpcTimeoutMs()
        : retryOptions.getMaxElapsedBackoffMillis());

    retryBuilder
        .setInitialRetryDelay(ofMillis(retryOptions.getInitialBackoffMillis()))
        .setRetryDelayMultiplier(retryOptions.getBackoffMultiplier())
        .setMaxRetryDelay(ofMillis(MAX_RETRY_TIMEOUT_MS))
        .setMaxAttempts(retryOptions.getMaxScanTimeoutRetries())
        .setInitialRpcTimeout(rpcTimeout)
        .setMaxRpcTimeout(rpcTimeout)
        .setTotalTimeout(totalTimeout);

    builder.readRowsSettings()
        .setRetrySettings(retryBuilder.build())
        .setRetryableCodes(buildRetryCodes(options.getRetryOptions()));
  }
260949
public void applyProperties(Map properties) {
        if (properties.containsKey("enabled")) {
            setEnabled(!"false".equalsIgnoreCase
                       ((String)properties.get("enabled")));
        }

        if (properties.containsKey("debug")) {
            setDebugEnabled(!"false".equalsIgnoreCase
                            ((String)properties.get("debug")));
        }

        if (properties.containsKey("info")) {
            setInfoEnabled(!"false".equalsIgnoreCase
                           ((String)properties.get("info")));
        }

        if (properties.containsKey("warn")) {
            setWarnEnabled(!"false".equalsIgnoreCase
                           ((String)properties.get("warn")));
        }

        if (properties.containsKey("error")) {
            setErrorEnabled(!"false".equalsIgnoreCase
                            ((String)properties.get("error")));
        }
    }
1181141
@SuppressWarnings("unchecked")
    public void raConfigure(ConfigProperties properties) {
        String httpClientFactoryClassName = (String) properties.getProperty(CFG_PROPERTY_HTTP_CLIENT_FACTORY)
                .getValue();
        if (!httpClientFactoryClassName.isEmpty()) {
            try {
                httpClientFactory = ((Class<? extends HttpAsyncClientFactory>) Class
                        .forName(httpClientFactoryClassName)).newInstance();
            } catch (Exception e) {
                tracer.severe("failed to load http client factory class", e);
            }
        } else {
            this.maxTotal = (Integer) properties.getProperty(CFG_PROPERTY_MAX_CONNECTIONS_TOTAL).getValue();
            this.defaultMaxPerRoute = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_MAX_CONNECTIONS_PER_ROUTE)
                    .getValue();
            this.connectTimeout = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_CONNECT_TIMEOUT).getValue();
            this.socketTimeout = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_SOCKET_TIMEOUT).getValue();
        }
    }
151305
protected void configureLinkedInClient(final Collection<BaseClient> properties) {
        val ln = pac4jProperties.getLinkedIn();
        if (StringUtils.isNotBlank(ln.getId()) && StringUtils.isNotBlank(ln.getSecret())) {
            val client = new LinkedIn2Client(ln.getId(), ln.getSecret());
            configureClient(client, ln);

            if (StringUtils.isNotBlank(ln.getScope())) {
                client.setScope(ln.getScope());
            }

            if (StringUtils.isNotBlank(ln.getFields())) {
                client.setFields(ln.getFields());
            }
            LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
            properties.add(client);
        }
    }
716229
protected void configureLimits(final T builder) {
        final Integer maxInboundMessageSize = this.properties.getMaxInboundMessageSize();
        if (maxInboundMessageSize != null) {
            builder.maxInboundMessageSize(maxInboundMessageSize);
        }
    }
314220
protected void configure(final T builder, final String name) {
        configureKeepAlive(builder, name);
        configureSecurity(builder, name);
        configureLimits(builder, name);
        configureCompression(builder, name);
        for (final GrpcChannelConfigurer channelConfigurer : this.channelConfigurers) {
            channelConfigurer.accept(builder, name);
        }
    }
1088826
private static void buildReadRowSettings(Builder builder, BigtableOptions options) {
    RetrySettings retrySettings =
        buildIdempotentRetrySettings(builder.readRowSettings().getRetrySettings(), options);

    builder.readRowSettings()
        .setRetrySettings(retrySettings)
        .setRetryableCodes(buildRetryCodes(options.getRetryOptions()));
  }
1098962
protected void configureOrcidClient(final Collection<BaseClient> properties) {
        val db = pac4jProperties.getOrcid();
        if (StringUtils.isNotBlank(db.getId()) && StringUtils.isNotBlank(db.getSecret())) {
            val client = new OrcidClient(db.getId(), db.getSecret());
            configureClient(client, db);

            LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
            properties.add(client);
        }
    }
143067
public static void setDnsCache(Properties properties) {
        for (Map.Entry<Object, Object> entry : properties.entrySet()) {
            final String host = (String) entry.getKey();
            String ipList = (String) entry.getValue();

            ipList = ipList.trim();
            if (ipList.isEmpty()) continue;

            final String[] ips = COMMA_SEPARATOR.split(ipList);
            setDnsCache(host, ips);
        }
    }
805278
public void setMapperProperties(Properties properties) {
        if (this.mapperHelper == null) {
            this.mapperHelper = new MapperHelper();
        }
        this.mapperHelper.setProperties(properties);
    }
469270
public void setProperties(Map<String, Object> properties)
    {
        this.properties.clear();
        this.properties.putAll(properties);
    }
779717
@Override
    public void setProperties(Properties properties) {
        if (this.env == null) {
            this.env = properties;
        } else {
            this.env.putAll(properties);
        }

        if (baseGateway != null) {
            baseGateway.setProperties(properties);
        }
    }
1093284
private synchronized void loadProperties()
	{
		// If multiple threads are waiting to invoke this method only allow
		// the first one to do so. The rest should just return since the first
		// thread through took care of loading the properties.
		try
		{
			
			this.file = null;
			
			boolean alwaysReload = this.isAlwaysReload();

			boolean useFormatting = this.isUseFormatting();
	
			String filePath = getSystemPropertyFile();
			if (filePath != null && filePath.length() > 0)
			{
				// System.out.println("CONFIG: LOADING CONFIG properties from "+
				// file);
				this.file = Paths.get(filePath).toFile();
				FileInputStream fis = new FileInputStream(file);

				try
				{
					properties = new Properties();
					// Load the properties object from the properties file
					properties.load(fis);
					// System.out.println("CONFIG: FINISHED LOADING CONFIG
					// properties from "+
					// file);

					configSourceLocation = file.getAbsolutePath();
				}
				catch (Exception e)
				{
					e.printStackTrace();
					throw new ConfigException(e.toString());
				}
				finally
				{
					if (fis != null)
						fis.close(); // Always close the file, even on exception

				}

			}
			else
			{
				properties = new Properties();

				try
				{
					String bundleName = getBundleName();

					// try to get properties from resource bundle
					ResourceBundle rb = ResourceBundle.getBundle(bundleName);

					URL url = Config.class.getResource(bundleName + ".properties");

					if (url != null)
						configSourceLocation = url.toString();
					else
						configSourceLocation = bundleName + ".properties";

					Enumeration<?> keys = rb.getKeys();

					Object k = null;

					while (keys.hasMoreElements())
					{

						k = keys.nextElement();

						properties.put(k, rb.getString(k + ""));

					}
				} // end els load from resource bundle
				catch (MissingResourceException e)
				{
				}
			}//end else
			
			

			//Determine global settings
			String reloadBool = properties.getProperty(Config.class.getName() + ".alwaysReload");

			if (reloadBool == null || reloadBool.length() == 0)
			{

				// throw new ConfigException("System property
				// "+Constants.ALWAY_RELOAD_PROP+" is not set.");

				alwaysReload = false;

			}
			else
			{
				alwaysReload = Boolean.valueOf(reloadBool).booleanValue();
			}

			this.setAlwaysReload(alwaysReload);

			// Merge SystemProperteis
			mergeSystemProperties = Boolean
					.valueOf(properties.getProperty(Config.class.getName() + ".mergeSystemProperties", "true"))
					.booleanValue();

			if (mergeSystemProperties)
			{
				// add system properties
				properties.putAll((Properties)System.getProperties().clone());
			}

			// Envinronment SystemProperteis
			mergeEnvProperties = Boolean
					.valueOf(properties.getProperty(Config.class.getName() + ".mergeEnvProperties", "true"))
					.booleanValue();

			if (mergeEnvProperties)
			{
				// add env properties
				properties.putAll(System.getenv());
			}

			// process formatting
			String propName = Config.class.getName() + ".useFormatting";
			String useFormattingText = properties.getProperty(propName);

			// System.out.println("CONFIG:
			// "+propName+"="+useFormattingText);

			if (useFormattingText == null || useFormattingText.length() == 0)
			{

				// throw new ConfigException("System property
				// "+Constants.ALWAY_RELOAD_PROP+" is not set.");

				useFormatting = false;

			}
			else
			{
				useFormatting = Boolean.valueOf(useFormattingText).booleanValue();
			}

			if (useFormatting)
			{
				// System.out.println("CONFIG: FORMATTING MAP CONFIG
				// properties ");
				// format map (note this can be an expensive operation)

				Text.formatMap(properties);
				// System.out.println("CONFIG: FORMATTED MAP CONFIG
				// properties ");
			}

			propName = Config.class.getName() + ".setSystemProperties";
			setSystemProperties = Boolean.valueOf(properties.getProperty(propName, "false")).booleanValue();

			// Set system properties with values from configuration
			if (setSystemProperties)
			{
				Set<Object> keySet = properties.keySet();
				String key;
				String sysProp;
				for (Iterator<Object> i = keySet.iterator(); i.hasNext();)
				{
					key = (String) i.next();
					sysProp = System.getProperty(key);

					if (sysProp != null && sysProp.length() > 0)
						continue; // do not override values

					// set system property
					System.setProperty(key, properties.getProperty(key));
				}
			}
			
			
			
		}
		catch (ConfigException e)
		{
			throw e;
		}
		catch (FileNotFoundException e)
		{
			throw new ConfigException(e.getMessage(), e);
		}
		catch (Exception e)
		{
			throw new ConfigException(e.getMessage(), e);
		}
		
		try
		{
			this.registry.notify(this.getClass().getName(), this);
		}
		catch(Exception e)
		{
			Debugger.printWarn(e);
		}
	}
915939
public void setProperties(final AttributePropertiesImpl properties) throws DevFailed {
        if (isMemorized()) {
            Object memorizedValue = getMemorizedValue();
            if (memorizedValue != null && memorizedValue.getClass().isAssignableFrom(Number.class)) {
                final double memoValue = Double.parseDouble(memorizedValue.toString());
                if (properties.getMaxValueDouble() < memoValue || properties.getMinValueDouble() > memoValue) {
                    throw DevFailedUtils.newDevFailed("min or max value not possible for current memorized value");
                }
            }
        }
        config.setAttributeProperties(properties);
        if (isFwdAttribute) {
            // set config on forwarded attribute
            final ForwardedAttribute fwdAttr = (ForwardedAttribute) behavior;
            properties.setRootAttribute(fwdAttr.getRootName());
            fwdAttr.setAttributeConfiguration(config);
        }
        config.persist(deviceName);
        EventManager.getInstance().pushAttributeConfigEvent(deviceName, name);
    }
623623
public void setProperties(final Properties properties) {
    this.properties = (null == properties) ? new Properties() : (Properties)properties.clone();
  }