All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cloudfoundry.promregator.scanner.AppInstanceScanner Maven / Gradle / Ivy

There is a newer version: 1.1.3
Show newest version
package org.cloudfoundry.promregator.scanner;

import java.util.List;
import java.util.function.Predicate;

import javax.annotation.Nullable;

public interface AppInstanceScanner {

	/**
	 * determines a list of instances based on a provided list of targets.
	 * Note that there may be more or less instances than targets as input. This may
	 * have multiple reasons:
	 * - one target resolves to multiple instances (e.g. if an application has multiple
	 * instances running due to load balancing or fail-over safety)
	 * - one target does not resolve to any instance, if the application has been
	 * misconfigured or if the application is currently not running.
	 * @param targets the list of targets, for which the properties of instances shall be determined
	 * @param applicationIdFilter an optional filter function allowing to prefilter results early, indicating whether an application based on its applicationId is in scope or not
	 * @param instanceFilter an optional filter function allowing to prefilter results early, indicating whether an instance is in scope or not
	 * @return the list of instances containing the access URL and the instance identifier
	 */
	@Nullable
	List determineInstancesFromTargets(List targets, @Nullable Predicate applicationIdFilter, @Nullable Predicate instanceFilter);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy