Initialize an environment builder based on the specified settings.
@param properties the couchbase properties to use
@return the {@link DefaultCouchbaseEnvironment} builder.
778551
protected DefaultCouchbaseEnvironment.Builder initializeEnvironmentBuilder(
			CouchbaseProperties properties) {
		CouchbaseProperties.Endpoints endpoints = properties.getEnv().getEndpoints();
		CouchbaseProperties.Timeouts timeouts = properties.getEnv().getTimeouts();
		DefaultCouchbaseEnvironment.Builder builder = DefaultCouchbaseEnvironment
				.builder();
		if (timeouts.getConnect() != null) {
			builder = builder.connectTimeout(timeouts.getConnect().toMillis());
		}
		builder = builder.keyValueServiceConfig(
				KeyValueServiceConfig.create(endpoints.getKeyValue()));
		if (timeouts.getKeyValue() != null) {
			builder = builder.kvTimeout(timeouts.getKeyValue().toMillis());
		}
		if (timeouts.getQuery() != null) {
			builder = builder.queryTimeout(timeouts.getQuery().toMillis());
			builder = builder.queryServiceConfig(getQueryServiceConfig(endpoints));
			builder = builder.viewServiceConfig(getViewServiceConfig(endpoints));
		}
		if (timeouts.getSocketConnect() != null) {
			builder = builder
					.socketConnectTimeout((int) timeouts.getSocketConnect().toMillis());
		}
		if (timeouts.getView() != null) {
			builder = builder.viewTimeout(timeouts.getView().toMillis());
		}
		CouchbaseProperties.Ssl ssl = properties.getEnv().getSsl();
		if (ssl.getEnabled()) {
			builder = builder.sslEnabled(true);
			if (ssl.getKeyStore() != null) {
				builder = builder.sslKeystoreFile(ssl.getKeyStore());
			}
			if (ssl.getKeyStorePassword() != null) {
				builder = builder.sslKeystorePassword(ssl.getKeyStorePassword());
			}
		}
		return builder;
	}
1298601
public static PrefixedProperties createCascadingPrefixProperties(final String[] prefixes) {
		PrefixedProperties properties = null;
		for (final String aPrefix : prefixes) {
			if (properties == null) {
				properties = new PrefixedProperties(aPrefix);
			} else {
				properties = new PrefixedProperties(properties, aPrefix);
			}
		}
		return properties;
	}
566573
public EnvironmentFactoryBuilder withConfigResolver(EnvironmentConfigResolver configResolver) {
    checkState(!this.configResolver.isPresent(), "Configuration resolution already set");

    return new EnvironmentFactoryBuilder(backendDomain, client, closer, resolver,
                                         Optional.of(configResolver));
  }
950797
@Deprecated
    protected @Nonnull DefaultEnvironment createEnvironment(@Nonnull String... environmentNames) {
        return createEnvironment(() -> Arrays.asList(environmentNames));
    }
382719
public BinderConfiguration createStateBinderConfiguration(final List<String> properties) {
        val binder = new BinderConfiguration();
        properties.forEach(p -> binder.addBinding(new BinderConfiguration.Binding(p, null, true)));
        return binder;
    }
1035200
public void createConfiguration(final Properties properties) {

        setHbcfg(HBaseConfiguration.create());

        getHbcfg().set(HBASE_ZOOKEEPER_QUORUM,
                properties.getProperty(HBASE_ZOOKEEPER_QUORUM, "hlt-services4"));

        getHbcfg().set(HBASE_ZOOKEEPER_CLIENT_PORT,
                properties.getProperty(HBASE_ZOOKEEPER_CLIENT_PORT, "2181"));

        getHbcfg().set(HADOOP_FS_DEFAULT_NAME,
                properties.getProperty(HADOOP_FS_DEFAULT_NAME, "hdfs://hlt-services4:9000"));

        // getHbcfg().set("hbase.client.retries.number", "1");
    }
974523
public DocumentDbFactory createDocumentDbFactory(final BaseCosmosDbProperties properties) {
        val documentClient = createDocumentClient(properties);
        return new DocumentDbFactory(documentClient);
    }
721200
public ExecutorFactoryConfigurationBuilder withProperties(Properties props) {
      attributes.attribute(PROPERTIES).set(TypedProperties.toTypedProperties(props));
      return this;
   }
1220810
@NotNull
    public final ArtifactFactoryConfig init(@NotNull final SrcGen4JContext context, final Map<String, String> vars) {
        Contract.requireArgNotNull("context", context);
        this.context = context;
        inheritVariables(vars);
        return this;
    }
51823
public ModelBuilder properties(Map<String, ModelProperty> properties) {
    this.properties.putAll(nullToEmptyMap(properties));
    return this;
  }
1375057
public CreateBranchRequest withEnvironmentVariables(java.util.Map<String, String> environmentVariables) {
        setEnvironmentVariables(environmentVariables);
        return this;
    }
975551
public LaunchConfig withEnvironmentVariables(java.util.Map<String, String> environmentVariables) {
        setEnvironmentVariables(environmentVariables);
        return this;
    }
721851
public static void configure(Properties props) {
        Properties defaultProperties = new Properties();

        HashMap<String, Properties> driversProps = new HashMap<>();
        for (Enumeration<?> enumeration = props.propertyNames(); enumeration.hasMoreElements();) {
            String propertyName = (String) enumeration.nextElement();
            String value = props.getProperty(propertyName);
            int idx = propertyName.lastIndexOf('.');
            if (idx < 0) {
                defaultProperties.put(propertyName, value);
            } else {
                String prefix = propertyName.substring(0, idx);
                String name = propertyName.substring(idx + 1);
                Properties driverProperties = driversProps.get(prefix);
                if (driverProperties == null) {
                    driverProperties = new Properties();
                    driversProps.put(prefix, driverProperties);
                }
                driverProperties.put(name, value);
            }
        }

        // Merge with default properties
        Map<String, Driver> newInstances = new HashMap<>();
        for (Entry<String, Properties> entry : driversProps.entrySet()) {
            String name = entry.getKey();
            Properties properties = new Properties();
            properties.putAll(defaultProperties);
            properties.putAll(entry.getValue());
            newInstances.put(name, createDriver(name, properties));
        }
        if (newInstances.get(DEFAULT_INSTANCE_NAME) == null
                && Parameters.REMOTE_URL_BASE.getValue(defaultProperties) != null) {

            newInstances.put(DEFAULT_INSTANCE_NAME, createDriver(DEFAULT_INSTANCE_NAME, defaultProperties));
        }

        instances = new IndexedInstances(newInstances);
    }
11883
public void setContextProperties(Map<String, String> contextProperties)
   {
      if (contextProperties != null) {
         this.contextProperties = new HashMap<String, String>(4);
         this.contextProperties.putAll(contextProperties);
      }
   }
1101704
public void setBaseEnvironmentProperties(Map<String, Object> baseEnvironmentProperties) {
		this.baseEnv = new Hashtable<String, Object>(baseEnvironmentProperties);
	}
401533
private void initConfigPropertyResolver(ServletContext context) {
		String configPropertyResolverClass = getInitParameter("configPropertyResolverClass");
		// Load a custom class to set configPropertyResolver
		configPropResolver = null;
		if (null != configPropertyResolverClass) {
			configPropResolver = (ConfigPropertyResolver) ClassLoaderResourceUtils
					.buildObjectInstance(configPropertyResolverClass);
			if (configPropResolver instanceof ServletContextAware) {
				((ServletContextAware) configPropResolver).setServletContext(context);
			}
		}
	}
261339
public static void init(Map configProperties){
		if(configProperties != null && configProperties.size() > 0){
			ElasticSearchPropertiesFilePlugin.configProperties = configProperties;
			initType = 1;
		}
	}