Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Copyright 2015 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.archaius.api;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
/**
* Core API for reading a configuration. The API is read only.
*/
@SuppressWarnings("JavadocDeclaration") // TODO: Fix up all the javadocs and remove this suppression
public interface Config extends PropertySource {
/**
* Interface for a visitor visiting all key, value pairs.
*
* Visitors should not have consequences based on specific key-value pairs and in general
* should be used primarily for logging purposes.
*
* Notably, instrumentation is by default disabled on visitors, meaning that if there are
* visitors that result in consequences based on specific key-value pairs, it is possible
* that they are still registered as unused and cleaned up, resulting in an unintended
* code behavior change.
*
* @param
*/
interface Visitor {
T visitKey(String key, Object value);
}
/**
* Register a listener that will receive a call for each property that is added, removed
* or updated. It is recommended that the callbacks be invoked only after a full refresh
* of the properties to ensure they are in a consistent state.
*
* @param listener
*/
void addListener(ConfigListener listener);
/**
* Remove a previously registered listener.
* @param listener
*/
void removeListener(ConfigListener listener);
/**
* Return the raw, un-interpolated, object associated with a key.
* @param key
*/
Object getRawProperty(String key);
/**
* Returns the raw object associated with a key, but without reporting on its usage. Only relevant for configs that
* support property instrumentation.
* @param key
*/
default Object getRawPropertyUninstrumented(String key) { return getRawProperty(key); }
@Override
default Optional