public SimpleMetricName(final String name, final String description) { checkArgumentNotNullNorEmpty(name, "name"); this.name = name; this.description = description; }
public SimpleMetricName(final String name, final String description) { checkArgumentNotNullNorEmpty(name, "name"); this.name = name; this.description = description; }
public ConfigurationLoader(final Collection<Class<?>> xbeanClasses, List<XBeanPostProcessor> xbeanPostProcessors) { checkArgumentNotNullNorEmpty(xbeanClasses, "xbeanClasses"); this.xbeanClasses = xbeanClasses; this.xbeanPostProcessors = xbeanPostProcessors; }
public ConfigurationLoader(final Collection<Class<?>> xbeanClasses, List<XBeanPostProcessor> xbeanPostProcessors) { checkArgumentNotNullNorEmpty(xbeanClasses, "xbeanClasses"); this.xbeanClasses = xbeanClasses; this.xbeanPostProcessors = xbeanPostProcessors; }
public NamedConfig(final String name) { checkArgumentNotNullNorEmpty(name, "name"); this.name = name; }
public NamedConfig(final String name) { checkArgumentNotNullNorEmpty(name, "name"); this.name = name; }
public JdbcInputConfig(final String name, final Map<String, Object> variables, final String pool, final List<String> queries) { super(name, variables); checkArgumentNotNull(pool, "pool"); checkArgumentNotNullNorEmpty(queries, "queries"); this.pool= pool; this.queries = Collections.unmodifiableList(queries); }
public GraphiteOutputConfig(final String name, final boolean default_, final String host, final int port, final String prefix) { super(name, default_); checkArgumentNotNullNorEmpty(host, "host"); checkArgument(port > 0 && port < 65536, "port must be in range [1,65535]"); this.host = host; this.port = port; this.prefix = prefix; }
public JdbcInputConfig(final String name, final Map<String, Object> variables, final String pool, final List<String> queries) { super(name, variables); checkArgumentNotNull(pool, "pool"); checkArgumentNotNullNorEmpty(queries, "queries"); this.pool= pool; this.queries = Collections.unmodifiableList(queries); }
public GraphiteOutputConfig(final String name, final boolean default_, final String host, final int port, final String prefix) { super(name, default_); checkArgumentNotNullNorEmpty(host, "host"); checkArgument(port > 0 && port < 65536, "port must be in range [1,65535]"); this.host = host; this.port = port; this.prefix = prefix; }
public JdbcConnectionPoolConfig(final int minSize, final int maxSize, final String name, final boolean ignored, final String url, final String driver, final String username, final String password, final Map<String, String> options, final int loginTimeout) { super(name, ignored); checkArgumentNotNullNorEmpty(url, "url"); checkArgument(maxSize >= minSize, "Max size must be greater than min size"); this.minSize = minSize; this.maxSize = maxSize; this.url = url; this.driver = driver; this.username = username; this.password = password; this.options = Collections.unmodifiableMap(options); this.loginTimeout = loginTimeout; }
public JdbcConnectionPoolConfig(final int minSize, final int maxSize, final String name, final boolean ignored, final String url, final String driver, final String username, final String password, final Map<String, String> options, final int loginTimeout) { super(name, ignored); checkArgumentNotNullNorEmpty(url, "url"); checkArgument(maxSize >= minSize, "Max size must be greater than min size"); this.minSize = minSize; this.maxSize = maxSize; this.url = url; this.driver = driver; this.username = username; this.password = password; this.options = Collections.unmodifiableMap(options); this.loginTimeout = loginTimeout; }
public OracleNoSQLInputConfig(final String name, final Map<String, Object> variables, final List<HostConfig> hosts, Optional<String> storeName, Optional<Path> trustFile, Optional<LoginConfig> login) { super(name, variables); checkArgumentNotNullNorEmpty(hosts, "hosts"); this.hosts = hosts; this.storeName = storeName; this.trustFile = trustFile; this.login = login; if (login.isPresent() || trustFile.isPresent() || storeName.isPresent()) { Preconditions.checkArgumentPresent(login, "login"); Preconditions.checkArgumentPresent(trustFile, "trustFile"); if (!Files.exists(trustFile.get())) { throw new IllegalArgumentException("The trust file [" + trustFile.get().toAbsolutePath() + "] does not exist"); } Preconditions.checkArgumentPresent(storeName, "storeName"); } }
checkArgumentNotNullNorEmpty(prefix, "prefix"); if (host != null) { variables.put(prefix + ".host", host);
checkArgumentNotNullNorEmpty(prefix, "prefix"); if (host != null) { variables.put(prefix + ".host", host);
protected Configuration load(final String filename) { checkArgumentNotNullNorEmpty(filename, "filename"); final File file = new File(filename); final XStream xstream = createXStream(); try { final ConfigurationXBean result = loadFile(file, xstream); applyPostProcessing(result); return result.toConfig(); } catch (final XStreamException | IOException e) { throw new ConfigurationException("Failed to load configuration from \"" + file.getAbsolutePath() + "\"", e); } }
public JmxMetricName(final ObjectName objectName, final String attributeName, final PropertyPath propertyPath, final String description) { checkArgumentNotNull(objectName, "objectName"); checkArgumentNotNull(propertyPath, "propertyPath"); checkArgumentNotNullNorEmpty(attributeName, "attributeName"); this.objectName = objectName; this.attributeName = attributeName; this.propertyPath = propertyPath; this.description = description; this.name = generateName(); }
public JmxMetricName(final ObjectName objectName, final String attributeName, final PropertyPath propertyPath, final String description) { checkArgumentNotNull(objectName, "objectName"); checkArgumentNotNull(propertyPath, "propertyPath"); checkArgumentNotNullNorEmpty(attributeName, "attributeName"); this.objectName = objectName; this.attributeName = attributeName; this.propertyPath = propertyPath; this.description = description; this.name = generateName(); }
protected Configuration load(final String filename) { checkArgumentNotNullNorEmpty(filename, "filename"); final File file = new File(filename); final XStream xstream = createXStream(); try { final ConfigurationXBean result = loadFile(file, xstream); applyPostProcessing(result); return result.toConfig(); } catch (final XStreamException | IOException e) { throw new ConfigurationException("Failed to load configuration from \"" + file.getAbsolutePath() + "\"", e); } }