ONOS-7050 Refactored PI translation service and store
The translation store is now able to maintain mappings between
translated entities and specific instances of a PI entry in the network
(i.e. applied to a device).
The translation service has been refactored to allow users to
learn and forget translated entities.
The refactoring of the P4Runtime driver using this service will be
submitted separatelly.
Change-Id: Iaafd87d90232514853ca0dea0115dbae4f6e7886
diff --git a/core/api/src/main/java/org/onosproject/net/pi/service/PiTranslationEvent.java b/core/api/src/main/java/org/onosproject/net/pi/service/PiTranslationEvent.java
index 4f59079..9e2411d 100644
--- a/core/api/src/main/java/org/onosproject/net/pi/service/PiTranslationEvent.java
+++ b/core/api/src/main/java/org/onosproject/net/pi/service/PiTranslationEvent.java
@@ -18,14 +18,15 @@
import com.google.common.annotations.Beta;
import org.onosproject.event.AbstractEvent;
+import org.onosproject.net.pi.runtime.PiEntity;
/**
* Signals an event related to the translation of a protocol-dependent (PD)
* entity to a protocol-independent (PI) one.
*/
@Beta
-public final class PiTranslationEvent
- extends AbstractEvent<PiTranslationEvent.Type, PiTranslatedEntity> {
+public final class PiTranslationEvent<T extends PiTranslatable, E extends PiEntity>
+ extends AbstractEvent<PiTranslationEvent.Type, PiTranslatedEntity<T, E>> {
/**
* Type of event.
@@ -50,7 +51,7 @@
* @param type type of event
* @param subject subject of event
*/
- public PiTranslationEvent(Type type, PiTranslatedEntity subject) {
+ public PiTranslationEvent(Type type, PiTranslatedEntity<T, E> subject) {
super(type, subject);
}
}