2 * Copyright (c) 2013 Cisco Systems, Inc. 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.openflowplugin.openflow.md.queue;
10 import java.util.Collection;
11 import java.util.List;
14 import org.opendaylight.openflowplugin.openflow.md.core.ConnectionConductor;
15 import org.opendaylight.openflowplugin.openflow.md.core.IMDMessageTranslator;
16 import org.opendaylight.openflowplugin.openflow.md.core.TranslatorKey;
20 * @param <IN> source type
21 * @param <OUT> result type
23 public interface QueueKeeper<IN, OUT> {
25 public enum QueueType {DEFAULT, UNORDERED}
28 * @param translatorMapping
30 void setTranslatorMapping(Map<TranslatorKey, Collection<IMDMessageTranslator<IN, List<OUT>>>> translatorMapping);
36 void push(IN message, ConnectionConductor conductor);
41 * @param ordered - true if message order matters, false otherwise
43 void push(IN message, ConnectionConductor conductor, QueueType queueType);
46 * @param popListenersMapping the popListenersMapping to set
48 void setPopListenersMapping(Map<Class<? extends OUT>, Collection<PopListener<OUT>>> popListenersMapping);