2 * Copyright (c) 2017 Pantheon Technologies 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
9 package org.opendaylight.openflowplugin.api.openflow.registry;
11 import java.util.function.Consumer;
13 public interface CommonDeviceRegistry<KEY> extends AutoCloseable {
16 * Store KEY in device registry.
17 * @param key device registry key
22 * Add mark for specified KEY.
23 * @param key device registry key
25 void addMark(KEY key);
28 * Checks if registry has mark for KEY.
29 * @param key device registry key
30 * @return true if device registry has mark for KEY
32 boolean hasMark(KEY key);
35 * Process marked keys.
40 * Iterate over all keys in device registry.
41 * @param consumer key consumer
43 void forEach(Consumer<KEY> consumer);
46 * Get device registry size.
47 * @return device registry size