This method never returns {@code null}.
- * - * @param persistence a {@link Persistence} containing bootstrap - * information from which persistence units and their - * configuration may be deduced; may be {@code null} in which case - * an {@linkplain Collection#isEmpty() empty} {@link Collection} - * will be returned - * - * @param classLoader a {@link ClassLoader} that the resulting - * {@link PersistenceUnitInfoBean} instances will use; may be - * {@code null} - * - * @param tempClassLoaderSupplier a {@link Supplier} of a {@link - * ClassLoader} that will be used to implement the {@link - * PersistenceUnitInfo#getNewTempClassLoader()} method; may be - * {@code null} - * - * @param rootUrl the {@link URL} representing the root of all - * persistence units; must not be {@code null} - * - * @param unlistedClasses a {@link Map} of managed classes indexed - * by persistence unit name whose values might not be explicitly - * listed in a {@link PersistenceUnit}; may be {@code null} - * - * @param dataSourceProvider a {@link DataSourceProvider}; must - * not be {@code null} - * - * @return a non-{@code null} {@link Collection} of {@link - * PersistenceUnitInfoBean} instances - * - * @exception MalformedURLException if a {@link URL} could not be - * constructed - * - * @exception NullPointerException if {@code rootUrl} or {@code - * dataSourceProvider} is {@code null} - * - * @see #fromPersistenceUnit(Persistence.PersistenceUnit, - * ClassLoader, Supplier, URL, Map, DataSourceProvider) - * - * @see PersistenceUnitInfo - * - * @deprecated Please use the {@link - * #fromPersistenceUnit(PersistenceUnit, ClassLoader, Supplier, - * URL, Map, Supplier)} method instead. - */ - @Deprecated - public static final Collection extends PersistenceUnitInfoBean> - fromPersistence(final Persistence persistence, - final ClassLoader classLoader, - final Supplier extends ClassLoader> tempClassLoaderSupplier, - final URL rootUrl, - Map extends String, ? extends Set extends Class>>> unlistedClasses, - final DataSourceProvider dataSourceProvider) - throws MalformedURLException { - return fromPersistence(persistence, - classLoader, - tempClassLoaderSupplier, - rootUrl, - unlistedClasses, - () -> dataSourceProvider); - } - - /** - * Creates and returns a {@link Collection} of {@link - * PersistenceUnitInfoBean} instances from a supplied {@link - * Persistence} object. - * - * @param persistence the {@link Persistence} from which {@link - * PersistenceUnitInfoBean} instances should be synthesized; must - * not be {@code null} - * - * @param classLoader classLoader a {@link ClassLoader} that the resulting - * {@link PersistenceUnitInfoBean}s will use; may be {@code null} - * - * @param tempClassLoaderSupplier a {@link Supplier} of a {@link - * ClassLoader} that will be used to implement the {@link - * PersistenceUnitInfo#getNewTempClassLoader()} method; may be - * {@code null} - * - * @param rootUrl the {@link URL} representing the root of the - * persistence units; must not be {@code null} - * - * @param unlistedClasses a {@link Map} of managed classes indexed - * by persistence unit name whose values might not be explicitly - * listed in the supplied {@link PersistenceUnit}s; may be {@code - * null} - * - * @param dataSourceProviderSupplier a {@link Supplier} capable of - * producing {@link DataSourceProvider} instances; must not be - * {@code null} - * - * @return a non-{@code null} {@link Collection} of {@link - * PersistenceUnitInfoBean}s - * - * @exception MalformedURLException if a {@link URL} could not be - * constructed - * - * @exception NullPointerException if {@code persistence}, {@code - * rootUrl} or {@code dataSourceProviderSupplier} is {@code null} - * - * @deprecated Please use the {@link - * #fromPersistenceUnit(PersistenceUnit, ClassLoader, Supplier, - * URL, Map, Supplier)} method instead. - */ - @Deprecated - public static final Collection extends PersistenceUnitInfoBean> - fromPersistence(final Persistence persistence, - final ClassLoader classLoader, - final Supplier extends ClassLoader> tempClassLoaderSupplier, - final URL rootUrl, - Map extends String, ? extends Set extends Class>>> unlistedClasses, - final Supplier extends DataSourceProvider> dataSourceProviderSupplier) - throws MalformedURLException { - - Objects.requireNonNull(rootUrl); - if (unlistedClasses == null) { - unlistedClasses = Collections.emptyMap(); - } - final CollectionThis field is never {@code null}.
- */ - private static final Logger LOGGER = Logger.getLogger(WeldJpaInjectionServices.class.getName(), - WeldJpaInjectionServices.class.getPackage().getName() + ".Messages"); - - - /* - * Constructors. - */ - - - /** - * Creates a new {@link WeldJpaInjectionServices}. - * - *Oddly, the fact that this constructor is {@code private} - * does not prevent Weld from loading it as a service. This is an - * unexpected bonus as nothing about this class should be {@code - * public}.
- */ - WeldJpaInjectionServices() { - super(); - } - - /** - * Throws an {@link IllegalArgumentException} when invoked. - * - * @exception IllegalArgumentException when invoked - * - * @see ResourceReferenceFactory#createResource() - * - * @deprecated This class is deprecated, no longer needed and is - * slated for removal. - */ - @Deprecated - @Override - public ResourceReferenceFactory
* If this method is not called,
* {@link io.helidon.metrics.MetricsSupport} would use the shared
@@ -571,19 +574,6 @@ public final class MetricsSupport implements Service {
return this;
}
- /**
- * Set a new root context for REST API of metrics.
- *
- * @param newContext context to use
- * @return updated builder instance
- * @deprecated use {@link #webContext(String)} instead, aligned with API
- * of heatlh checks
- */
- @Deprecated
- public Builder context(String newContext) {
- return webContext(newContext);
- }
-
/**
* Set a new root context for REST API of metrics.
*
diff --git a/metrics/metrics/src/main/java/io/helidon/metrics/RegistryFactory.java b/metrics/metrics/src/main/java/io/helidon/metrics/RegistryFactory.java
index 5530cefdf..9cb6c2bb2 100644
--- a/metrics/metrics/src/main/java/io/helidon/metrics/RegistryFactory.java
+++ b/metrics/metrics/src/main/java/io/helidon/metrics/RegistryFactory.java
@@ -18,7 +18,6 @@ package io.helidon.metrics;
import java.util.EnumMap;
import java.util.concurrent.atomic.AtomicReference;
-import java.util.function.Supplier;
import io.helidon.config.Config;
@@ -85,34 +84,6 @@ public final class RegistryFactory {
return new RegistryFactory(config);
}
-
-
- /**
- * Get a supplier for registry factory. The supplier will return the singleton isntance
- * that is created.
- *
- * @return supplier of registry factory (to bind as late as possible)
- * @deprecated use {@link io.helidon.metrics.RegistryFactory#getInstance() RegistryFactory::getInstance} instead.
- */
- @Deprecated
- public static Supplier
- * {@code Span} is a tracing component from opentracing.io standard.
- *
- * @return a current span
- * @deprecated use {@link #spanContext()} instead
- */
- @Deprecated
- Span span();
-
/**
* Returns a span context related to the current request.
*
* {@code SpanContext} is a tracing component from opentracing.io standard.
*
- * @return the related span context, may be null if not enabled
- * @deprecated this method will have a different return type in next backward incompatible version
- * of Helidon. It will return {@code Optional