Search in sources :

Example 6 with TunnelSubscription

use of org.onosproject.incubator.net.tunnel.TunnelSubscription in project onos by opennetworkinglab.

the class DistributedTunnelStore method activate.

@Activate
public void activate() {
    KryoNamespace.Builder serializer = KryoNamespace.newBuilder().register(KryoNamespaces.API).register(MultiValuedTimestamp.class);
    tunnelIdAsKeyStore = storageService.<TunnelId, Tunnel>eventuallyConsistentMapBuilder().withName("all_tunnel").withSerializer(serializer).withTimestampProvider((k, v) -> new WallClockTimestamp()).build();
    orderRelationship = storageService.<ApplicationId, Set<TunnelSubscription>>eventuallyConsistentMapBuilder().withName("type_tunnel").withSerializer(serializer).withTimestampProvider((k, v) -> new WallClockTimestamp()).build();
    idGenerator = coreService.getIdGenerator(tunnelOpTopic);
    tunnelIdAsKeyStore.addListener(tunnelUpdateListener);
    log.info("Started");
}
Also used : WallClockTimestamp(org.onosproject.store.service.WallClockTimestamp) KryoNamespace(org.onlab.util.KryoNamespace) TunnelSubscription(org.onosproject.incubator.net.tunnel.TunnelSubscription) Activate(org.osgi.service.component.annotations.Activate)

Aggregations

TunnelSubscription (org.onosproject.incubator.net.tunnel.TunnelSubscription)6 DefaultTunnel (org.onosproject.incubator.net.tunnel.DefaultTunnel)4 Tunnel (org.onosproject.incubator.net.tunnel.Tunnel)4 HashSet (java.util.HashSet)3 TunnelId (org.onosproject.incubator.net.tunnel.TunnelId)3 KryoNamespace (org.onlab.util.KryoNamespace)1 ApplicationId (org.onosproject.core.ApplicationId)1 DefaultApplicationId (org.onosproject.core.DefaultApplicationId)1 TunnelService (org.onosproject.incubator.net.tunnel.TunnelService)1 WallClockTimestamp (org.onosproject.store.service.WallClockTimestamp)1 Activate (org.osgi.service.component.annotations.Activate)1