private void loadContainers(ContainerConfig config, Collection<String> containers, Map<String, BlobCrypter> crypters, Map<String, String> domains, Map<String, Integer> tokenTTLs) throws IOException { for (String container : containers) { String key = config.getString(container, SECURITY_TOKEN_KEY); if (key != null) { BlobCrypter crypter = loadCrypter(key); crypters.put(container, crypter); } String domain = config.getString(container, SIGNED_FETCH_DOMAIN); domains.put(container, domain); // Process tokenTTLs int tokenTTL = config.getInt(container, SECURITY_TOKEN_TTL_CONFIG); // 0 means the value was not defined or NaN. 0 shouldn't be a valid TTL anyway. if (tokenTTL > 0) { tokenTTLs.put(container, tokenTTL); } else { LOG.logp(Level.WARNING, CLASSNAME, "loadContainers", "Token TTL for container \"{0}\" was {1} and will be ignored.", new Object[] { container, tokenTTL }); } } }
private void loadContainers(ContainerConfig config, Collection<String> containers, Map<String, BlobCrypter> crypters, Map<String, String> domains, Map<String, Integer> tokenTTLs) throws IOException { for (String container : containers) { String key = config.getString(container, SECURITY_TOKEN_KEY); if (key != null) { BlobCrypter crypter = loadCrypter(key); crypters.put(container, crypter); } String domain = config.getString(container, SIGNED_FETCH_DOMAIN); domains.put(container, domain); // Process tokenTTLs int tokenTTL = config.getInt(container, SECURITY_TOKEN_TTL_CONFIG); // 0 means the value was not defined or NaN. 0 shouldn't be a valid TTL anyway. if (tokenTTL > 0) { tokenTTLs.put(container, tokenTTL); } else { LOG.logp(Level.WARNING, CLASSNAME, "loadContainers", "Token TTL for container \"{0}\" was {1} and will be ignored.", new Object[] { container, tokenTTL }); } } }
private void loadContainers(ContainerConfig config, Collection<String> containers, Map<String, BlobCrypter> crypters, Map<String, String> domains, Map<String, Integer> tokenTTLs) throws IOException { for (String container : containers) { String key = config.getString(container, SECURITY_TOKEN_KEY); if (key != null) { BlobCrypter crypter = loadCrypter(key); crypters.put(container, crypter); } String domain = config.getString(container, SIGNED_FETCH_DOMAIN); domains.put(container, domain); // Process tokenTTLs int tokenTTL = config.getInt(container, SECURITY_TOKEN_TTL_CONFIG); // 0 means the value was not defined or NaN. 0 shouldn't be a valid TTL anyway. if (tokenTTL > 0) { tokenTTLs.put(container, tokenTTL); } else { LOG.logp(Level.WARNING, CLASSNAME, "loadContainers", "Token TTL for container \"{0}\" was {1} and will be ignored.", new Object[] { container, tokenTTL }); } } }