Interface P4RuntimeMirror<H extends org.onosproject.net.pi.runtime.PiHandle,​E extends org.onosproject.net.pi.runtime.PiEntity>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.onosproject.net.Annotations annotations​(H handle)
      Returns annotations associated to the given handle, if present, otherwise null.
      void applyWriteRequest​(org.onosproject.p4runtime.api.P4RuntimeWriteClient.WriteRequest request)
      Uses the given P4Runtime write request to update the state of this mirror by optimistically assuming that all updates in it will succeed.
      void applyWriteResponse​(org.onosproject.p4runtime.api.P4RuntimeWriteClient.WriteResponse response)
      Uses the given P4Runtime write response to update the state of this mirror.
      TimedEntry<E> get​(H handle)
      Returns entry associated to the given handle, if present, otherwise null.
      java.util.Collection<TimedEntry<E>> getAll​(org.onosproject.net.DeviceId deviceId)
      Returns all entries for the given device ID.
      void put​(H handle, E entry)
      Stores the given entry associating it to the given handle.
      void putAnnotations​(H handle, org.onosproject.net.Annotations annotations)
      Stores the given annotations associating it to the given handle.
      void remove​(H handle)
      Removes the entry associated to the given handle.
      void sync​(org.onosproject.net.DeviceId deviceId, java.util.Collection<E> entities)
      Synchronizes the state of the given device ID with the given collection of PI entities.
    • Method Detail

      • getAll

        java.util.Collection<TimedEntry<E>> getAll​(org.onosproject.net.DeviceId deviceId)
        Returns all entries for the given device ID.
        Parameters:
        deviceId - device ID
        Returns:
        collection of table entries
      • get

        TimedEntry<E> get​(H handle)
        Returns entry associated to the given handle, if present, otherwise null.
        Parameters:
        handle - handle
        Returns:
        PI table entry
      • put

        void put​(H handle,
                 E entry)
        Stores the given entry associating it to the given handle.
        Parameters:
        handle - handle
        entry - entry
      • remove

        void remove​(H handle)
        Removes the entry associated to the given handle.
        Parameters:
        handle - handle
      • putAnnotations

        void putAnnotations​(H handle,
                            org.onosproject.net.Annotations annotations)
        Stores the given annotations associating it to the given handle.
        Parameters:
        handle - handle
        annotations - entry
      • annotations

        org.onosproject.net.Annotations annotations​(H handle)
        Returns annotations associated to the given handle, if present, otherwise null.
        Parameters:
        handle - handle
        Returns:
        PI table annotations
      • sync

        void sync​(org.onosproject.net.DeviceId deviceId,
                  java.util.Collection<E> entities)
        Synchronizes the state of the given device ID with the given collection of PI entities.
        Parameters:
        deviceId - device ID
        entities - collection of PI entities
      • applyWriteRequest

        void applyWriteRequest​(org.onosproject.p4runtime.api.P4RuntimeWriteClient.WriteRequest request)
        Uses the given P4Runtime write request to update the state of this mirror by optimistically assuming that all updates in it will succeed.
        Parameters:
        request - P4Runtime write request
      • applyWriteResponse

        void applyWriteResponse​(org.onosproject.p4runtime.api.P4RuntimeWriteClient.WriteResponse response)
        Uses the given P4Runtime write response to update the state of this mirror.
        Parameters:
        response - P4Runtime write response