io.helidon.config.spi.ConfigContent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of helidon-config Show documentation
Show all versions of helidon-config Show documentation
Configuration Core module.
/*
* Copyright (c) 2020 Oracle and/or its affiliates.
*
* 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 io.helidon.config.spi;
import java.util.Optional;
/**
* Config content as provided by a config source that can read all its data at once (an "eager" config source).
* This interface provides necessary support for changes of the underlying source and for parsable content.
*
* Content can either provide a {@link io.helidon.config.spi.ConfigNode.ObjectNode} or an array of bytes to be parsed by a
* {@link io.helidon.config.spi.ConfigParser}.
*
* The data stamp can be any object (to be decided by the {@link io.helidon.config.spi.ConfigSource}).
*/
public interface ConfigContent {
/**
* Close the content, as it is no longer needed.
*/
default void close() {
}
/**
* A modification stamp of the content.
*
* @return a stamp of the content
*/
default Optional