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

io.helidon.microprofile.cdi.ExecutorServices Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
/*
 * 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.microprofile.cdi;

import java.util.Collection;
import java.util.concurrent.Callable;

import org.jboss.weld.executor.CommonForkJoinPoolExecutorServices;

/**
 * A {@link CommonForkJoinPoolExecutorServices} whose {@link
 * #wrap(Collection)} method simply returns the supplied {@link
 * Collection} of {@link Callable}s unchanged.
 *
 * 

This class exists to work around WELD-2494, which, in turn, was working around * JDK-8184335.

* * @see #wrap(Collection) */ public final class ExecutorServices extends CommonForkJoinPoolExecutorServices { /** * Creates a new {@link ExecutorServices}. * *

There is no reason for users to call this constructor.

*/ public ExecutorServices() { super(); } /** * Returns the supplied {@code tasks} argument unchanged when invoked. * * @param tasks a {@link Collection} of {@link Callable}s * representing tasks that Weld needs to do; may be {@code null} * * @return the supplied {@code tasks} argument * * @see WELD-2494 */ @Override public Collection> wrap(Collection> tasks) { return tasks; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy