com.rabbitmq.stream.impl.DelegatingExecutorService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stream-client Show documentation
Show all versions of stream-client Show documentation
The RabbitMQ Stream Java client library allows Java applications to interface with
RabbitMQ Stream.
The newest version!
// Copyright (c) 2025 Broadcom. All Rights Reserved.
// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
//
// This software, the RabbitMQ Stream Java client library, is dual-licensed under the
// Mozilla Public License 2.0 ("MPL"), and the Apache License version 2 ("ASL").
// For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
// please see LICENSE-APACHE2.
//
// This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
// either express or implied. See the LICENSE file for specific language governing
// rights and limitations of this software.
//
// If you have any questions regarding licensing, please contact us at
// [email protected].
package com.rabbitmq.stream.impl;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.*;
final class DelegatingExecutorService implements ExecutorService {
private final ExecutorService delegate;
private final int id;
DelegatingExecutorService(int id, ExecutorService delegate) {
this.id = id;
this.delegate = delegate;
}
@Override
public void shutdown() {
this.delegate.shutdown();
}
@Override
public List shutdownNow() {
return this.delegate.shutdownNow();
}
@Override
public boolean isShutdown() {
return this.delegate.isShutdown();
}
@Override
public boolean isTerminated() {
return this.delegate.isTerminated();
}
@Override
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
return this.delegate.awaitTermination(timeout, unit);
}
@Override
public Future submit(Callable task) {
return this.delegate.submit(task);
}
@Override
public Future submit(Runnable task, T result) {
return this.delegate.submit(task, result);
}
@Override
public Future> submit(Runnable task) {
return this.delegate.submit(task);
}
@Override
public List> invokeAll(Collection extends Callable> tasks)
throws InterruptedException {
return this.delegate.invokeAll(tasks);
}
@Override
public List> invokeAll(
Collection extends Callable> tasks, long timeout, TimeUnit unit)
throws InterruptedException {
return this.delegate.invokeAll(tasks, timeout, unit);
}
@Override
public T invokeAny(Collection extends Callable> tasks)
throws InterruptedException, ExecutionException {
return this.delegate.invokeAny(tasks);
}
@Override
public T invokeAny(Collection extends Callable> tasks, long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
return this.delegate.invokeAny(tasks, timeout, unit);
}
@Override
public void execute(Runnable command) {
this.delegate.execute(command);
}
@Override
public String toString() {
return "DelegatingExecutorService{" + "id=" + id + '}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy