/** * Gets the GemFire Distributed System (cluster) Properties. * * @return a Properties object containing the configuration settings for the GemFire Distributed * System (cluster). * @see java.util.Properties */ public Properties getProperties() { return (Properties) this.distributedSystemProperties.clone(); }
/** * Gets the GemFire Distributed System (cluster) Properties. * * @return a Properties object containing the configuration settings for the GemFire Distributed * System (cluster). * @see java.util.Properties */ public Properties getProperties() { return (Properties) this.distributedSystemProperties.clone(); }
/** * The {@code Properties} for the connection. * * @return the connection {@code Properties} */ public Properties getProperties() { return (Properties) properties.clone(); }
public Object clone() { return delegate.clone(); }
/** * replace a property by a starred version * * @param props properties to check * @param key proeprty to mask * * @return cloned and masked properties */ public static Properties maskOut(Properties props, String key) { Properties clone = ( Properties ) props.clone(); if ( clone.get( key ) != null ) { clone.setProperty( key, "****" ); } return clone; }
/** * Copy constructor */ public HiveConf(HiveConf other) { super(other); hiveJar = other.hiveJar; auxJars = other.auxJars; isSparkConfigUpdated = other.isSparkConfigUpdated; origProp = (Properties)other.origProp.clone(); restrictList.addAll(other.restrictList); hiddenSet.addAll(other.hiddenSet); modWhiteListPattern = other.modWhiteListPattern; }
/** * Clone the basic settings for this connection! */ @Override public Object clone() { BaseDatabaseMeta retval = null; try { retval = (BaseDatabaseMeta) super.clone(); // CLone the attributes as well... retval.attributes = (Properties) attributes.clone(); } catch ( CloneNotSupportedException e ) { throw new RuntimeException( e ); } return retval; }
/** * Convenience method that returns MiniKdc default configuration. * <p> * The returned configuration is a copy, it can be customized before using * it to create a MiniKdc. * @return a MiniKdc default configuration. */ public static Properties createConf() { return (Properties) DEFAULT_CONFIG.clone(); }
public Object clone() { return getDelegate().clone(); }
@Override public synchronized Object clone() { if (interned != null) return new CopyOnFirstWriteProperties(interned); else return super.clone(); }
protected TransformerImpl(Translet translet, Properties outputProperties, int indentNumber, TransformerFactoryImpl tfactory) { _translet = (AbstractTranslet) translet; _properties = createOutputProperties(outputProperties); _propertiesClone = (Properties) _properties.clone(); _indentNumber = indentNumber; _tfactory = tfactory; //_isIncremental = tfactory._incremental; }
@Override public Settings copy() { return new PropertiesSettings((Properties) props.clone()); }
/** * A new configuration with the same settings cloned from another. * * @param other the configuration from which to clone settings. */ @SuppressWarnings("unchecked") public Configuration(Configuration other) { this.resources = (ArrayList<Resource>) other.resources.clone(); synchronized(other) { if (other.properties != null) { this.properties = (Properties)other.properties.clone(); } if (other.overlay!=null) { this.overlay = (Properties)other.overlay.clone(); } this.updatingResource = new ConcurrentHashMap<String, String[]>( other.updatingResource); this.finalParameters = Collections.newSetFromMap( new ConcurrentHashMap<String, Boolean>()); this.finalParameters.addAll(other.finalParameters); } synchronized(Configuration.class) { REGISTRY.put(this, null); } this.classLoader = other.classLoader; this.loadDefaults = other.loadDefaults; setQuietMode(other.getQuietMode()); }
private InitialDirContext createContext(Properties properties) { LettuceAssert.notNull(properties, "Properties must not be null"); Properties hashtable = (Properties) properties.clone(); hashtable.put(InitialContext.INITIAL_CONTEXT_FACTORY, CTX_FACTORY_NAME); if (!hashtable.containsKey(INITIAL_TIMEOUT)) { hashtable.put(INITIAL_TIMEOUT, DEFAULT_INITIAL_TIMEOUT); } if (!hashtable.containsKey(LOOKUP_RETRIES)) { hashtable.put(LOOKUP_RETRIES, DEFAULT_RETRIES); } try { return new InitialDirContext(hashtable); } catch (NamingException e) { throw new IllegalStateException(e); } }
/** * Get the static properties for xsl:output. The object returned will * be a clone of the internal values, and thus it can be mutated * without mutating the Templates object, and then handed in to * the process method. * * <p>For XSLT, Attribute Value Templates attribute values will * be returned unexpanded (since there is no context at this point).</p> * * @return A Properties object, not null. */ public Properties getOutputProperties() { return (Properties)getDefaultOutputProps().clone(); }
public static Builder createDefaultConfigBuilder() { return createDefaultConfigBuilder(System.getenv(), (Properties) System.getProperties().clone()); }
@Override public ConnectionInfo clone() throws CloneNotSupportedException { ConnectionInfo clone = (ConnectionInfo) super.clone(); clone.prop = (Properties) prop.clone(); clone.filePasswordHash = Utils.cloneByteArray(filePasswordHash); clone.fileEncryptionKey = Utils.cloneByteArray(fileEncryptionKey); clone.userPasswordHash = Utils.cloneByteArray(userPasswordHash); return clone; }
private Session getSession() { Properties props = (Properties) System.getProperties().clone(); if (isNotEmpty(alertingPlugin.getSmtpUser()) && isNotEmpty(alertingPlugin.getSmtpPassword())) { props.setProperty("mail.smtps.auth", "true"); } int smtpPort = alertingPlugin.getSmtpPort(); props.setProperty("mail.smtp.port", Integer.toString(smtpPort)); if (smtpPort == 587) { props.put("mail.smtp.starttls.enable", "true"); } return Session.getInstance(props); }
private static void performSet() { TestBean bean = new TestBean(); Properties p = (Properties) System.getProperties().clone(); assertTrue("The System properties must not be empty", p.size() != 0); for (Iterator<?> i = p.entrySet().iterator(); i.hasNext();) { i.next(); if (Math.random() > 0.9) { i.remove(); } } ByteArrayOutputStream buffer = new ByteArrayOutputStream(); try { p.store(buffer, null); } catch (IOException e) { // ByteArrayOutputStream does not throw // any IOException } String value = new String(buffer.toByteArray()); BeanWrapperImpl wrapper = new BeanWrapperImpl(bean); wrapper.setPropertyValue("properties", value); assertEquals(p, bean.getProperties()); }
/** * @param url URL connection. * @param props Environment properties. * @throws SQLException On error. */ public void init(String url, Properties props) throws SQLException { Properties props0 = (Properties)props.clone(); if (!F.isEmpty(url)) parseUrl(url, props0); for (ConnectionProperty aPropsArray : propsArray) aPropsArray.init(props0); if (!F.isEmpty(props.getProperty("user"))) { setUsername(props.getProperty("user")); setPassword(props.getProperty("password")); } }