blob: 4cfe0c5cdc6008a35f7bc547ffc8281e9df866a4 [file] [log] [blame]
Carmelo Cascone58136812018-07-19 03:40:16 +02001/*
2 * Copyright 2018-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.drivers.p4runtime.mirror;
18
19import org.apache.felix.scr.annotations.Component;
20import org.apache.felix.scr.annotations.Service;
21import org.onlab.util.KryoNamespace;
22import org.onosproject.net.pi.runtime.PiMulticastGroupEntry;
23import org.onosproject.net.pi.runtime.PiMulticastGroupEntryHandle;
24import org.onosproject.store.serializers.KryoNamespaces;
25
26/**
27 * Distributed implementation of a P4Runtime multicast group mirror.
28 */
29@Component(immediate = true)
30@Service
31public final class DistributedP4RuntimeMulticastGroupMirror
32 extends AbstractDistributedP4RuntimeMirror
33 <PiMulticastGroupEntryHandle, PiMulticastGroupEntry>
34 implements P4RuntimeMulticastGroupMirror {
35
36 private static final String DIST_MAP_NAME = "onos-p4runtime-mc-group-mirror";
37
38 @Override
39 String mapName() {
40 return DIST_MAP_NAME;
41 }
42
43 @Override
44 KryoNamespace storeSerializer() {
45 return KryoNamespace.newBuilder()
46 .register(KryoNamespaces.API)
47 .register(TimedEntry.class)
48 .build();
49 }
50}