2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.util.concurrent;
10 import com.google.common.annotations.Beta;
11 import java.util.concurrent.Executor;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.opendaylight.yangtools.util.ForwardingIdentityObject;
14 import org.opendaylight.yangtools.util.concurrent.QueuedNotificationManager.BatchedInvoker;
18 public class IdentityQueuedNotificationManager<L, N>
19 extends AbstractQueuedNotificationManager<ForwardingIdentityObject<L>, L, N> {
20 public IdentityQueuedNotificationManager(final String name, final Executor executor, final int maxQueueCapacity,
21 final BatchedInvoker<L, N> listenerInvoker) {
22 super(name, executor, maxQueueCapacity, listenerInvoker);
26 final ForwardingIdentityObject<L> wrap(final L listener) {
27 return ForwardingIdentityObject.of(listener);
31 final L unwrap(final ForwardingIdentityObject<L> key) {
32 return key.getDelegate();