@Override public void event(EventuallyConsistentMapEvent<RouterId, Router> event) { checkNotNull(event, EVENT_NOT_NULL); Router router = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new RouterEvent(RouterEvent.Type.ROUTER_PUT, router)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new RouterEvent(RouterEvent.Type.ROUTER_DELETE, router)); } } }
@Override public void event(EventuallyConsistentMapEvent<DeviceId, PipelineStatus> event) { final DeviceId deviceId = event.key(); final PipelineStatus status = event.value(); switch (event.type()) { case PUT: postStatusEvent(deviceId, status); break; case REMOVE: postStatusEvent(deviceId, PipelineStatus.UNKNOWN); break; default: log.error("Unknown map event type {}", event.type()); } }
@Override public void event(EventuallyConsistentMapEvent<RouterId, Router> event) { checkNotNull(event, EVENT_NOT_NULL); Router router = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new RouterEvent(RouterEvent.Type.ROUTER_PUT, router)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new RouterEvent(RouterEvent.Type.ROUTER_DELETE, router)); } } }
@Override public void event(EventuallyConsistentMapEvent<PortChainId, PortChain> event) { checkNotNull(event, EVENT_NOT_NULL); PortChain portChain = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new PortChainEvent( PortChainEvent.Type.PORT_CHAIN_PUT, portChain)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new PortChainEvent( PortChainEvent.Type.PORT_CHAIN_DELETE, portChain)); } } }
@Override public void event(EventuallyConsistentMapEvent<PortPairGroupId, PortPairGroup> event) { checkNotNull(event, EVENT_NOT_NULL); PortPairGroup portPairGroup = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new PortPairGroupEvent( PortPairGroupEvent.Type.PORT_PAIR_GROUP_PUT, portPairGroup)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new PortPairGroupEvent( PortPairGroupEvent.Type.PORT_PAIR_GROUP_DELETE, portPairGroup)); } } }
@Override public void event(EventuallyConsistentMapEvent<PortPairId, PortPair> event) { checkNotNull(event, EVENT_NOT_NULL); PortPair portPair = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new PortPairEvent( PortPairEvent.Type.PORT_PAIR_PUT, portPair)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new PortPairEvent( PortPairEvent.Type.PORT_PAIR_DELETE, portPair)); } } }
@Override public void event(EventuallyConsistentMapEvent<PortPairId, PortPair> event) { checkNotNull(event, EVENT_NOT_NULL); PortPair portPair = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new PortPairEvent( PortPairEvent.Type.PORT_PAIR_PUT, portPair)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new PortPairEvent( PortPairEvent.Type.PORT_PAIR_DELETE, portPair)); } } }
@Override public void event(EventuallyConsistentMapEvent<SubnetId, RouterInterface> event) { checkNotNull(event, EVENT_NOT_NULL); RouterInterface routerInterface = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new RouterInterfaceEvent( RouterInterfaceEvent.Type.ROUTER_INTERFACE_PUT, routerInterface)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new RouterInterfaceEvent( RouterInterfaceEvent.Type.ROUTER_INTERFACE_DELETE, routerInterface)); } } }
@Override public void event(EventuallyConsistentMapEvent<SubnetId, RouterInterface> event) { checkNotNull(event, EVENT_NOT_NULL); RouterInterface routerInterface = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new RouterInterfaceEvent( RouterInterfaceEvent.Type.ROUTER_INTERFACE_PUT, routerInterface)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new RouterInterfaceEvent( RouterInterfaceEvent.Type.ROUTER_INTERFACE_DELETE, routerInterface)); } } }
@Override public void event(EventuallyConsistentMapEvent<FlowClassifierId, FlowClassifier> event) { checkNotNull(event, EVENT_NOT_NULL); FlowClassifier flowClassifier = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new FlowClassifierEvent( FlowClassifierEvent.Type.FLOW_CLASSIFIER_PUT, flowClassifier)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new FlowClassifierEvent( FlowClassifierEvent.Type.FLOW_CLASSIFIER_DELETE, flowClassifier)); } } }
@Override public void event(EventuallyConsistentMapEvent<PortPairGroupId, PortPairGroup> event) { checkNotNull(event, EVENT_NOT_NULL); PortPairGroup portPairGroup = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new PortPairGroupEvent( PortPairGroupEvent.Type.PORT_PAIR_GROUP_PUT, portPairGroup)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new PortPairGroupEvent( PortPairGroupEvent.Type.PORT_PAIR_GROUP_DELETE, portPairGroup)); } } }
@Override public void event(EventuallyConsistentMapEvent<PortChainId, PortChain> event) { checkNotNull(event, EVENT_NOT_NULL); PortChain portChain = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new PortChainEvent( PortChainEvent.Type.PORT_CHAIN_PUT, portChain)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new PortChainEvent( PortChainEvent.Type.PORT_CHAIN_DELETE, portChain)); } } }
@Override public void event(EventuallyConsistentMapEvent<FlowClassifierId, FlowClassifier> event) { checkNotNull(event, EVENT_NOT_NULL); FlowClassifier flowClassifier = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new FlowClassifierEvent( FlowClassifierEvent.Type.FLOW_CLASSIFIER_PUT, flowClassifier)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new FlowClassifierEvent( FlowClassifierEvent.Type.FLOW_CLASSIFIER_DELETE, flowClassifier)); } } }
@Override public void event(EventuallyConsistentMapEvent<VirtualPortId, VirtualPort> event) { checkNotNull(event, EVENT_NOT_NULL); log.info("virtual port event raised"); VirtualPort virtualPort = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new VirtualPortEvent( VirtualPortEvent.Type.VIRTUAL_PORT_PUT, virtualPort)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new VirtualPortEvent( VirtualPortEvent.Type.VIRTUAL_PORT_DELETE, virtualPort)); } } }
@Override public void event(EventuallyConsistentMapEvent<VirtualPortId, VirtualPort> event) { checkNotNull(event, EVENT_NOT_NULL); log.info("virtual port event raised"); VirtualPort virtualPort = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new VirtualPortEvent( VirtualPortEvent.Type.VIRTUAL_PORT_PUT, virtualPort)); } if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new VirtualPortEvent( VirtualPortEvent.Type.VIRTUAL_PORT_DELETE, virtualPort)); } } }
@Override public void event(EventuallyConsistentMapEvent<FloatingIpId, FloatingIp> event) { checkNotNull(event, EVENT_NOT_NULL); FloatingIp floatingIp = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new FloatingIpEvent( FloatingIpEvent.Type.FLOATINGIP_PUT, if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new FloatingIpEvent( FloatingIpEvent.Type.FLOATINGIP_DELETE,
@Override public void event(EventuallyConsistentMapEvent<FloatingIpId, FloatingIp> event) { checkNotNull(event, EVENT_NOT_NULL); FloatingIp floatingIp = event.value(); if (EventuallyConsistentMapEvent.Type.PUT == event.type()) { notifyListeners(new FloatingIpEvent( FloatingIpEvent.Type.FLOATINGIP_PUT, if (EventuallyConsistentMapEvent.Type.REMOVE == event.type()) { notifyListeners(new FloatingIpEvent( FloatingIpEvent.Type.FLOATINGIP_DELETE,