Class AbstractDistributedP4RuntimeMirror<H extends org.onosproject.net.pi.runtime.PiHandle,​E extends org.onosproject.net.pi.runtime.PiEntity>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.onosproject.net.pi.service.PiPipeconfWatchdogService pipeconfWatchdogService  
      protected org.onosproject.store.service.StorageService storageService  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activate()  
      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.
      void deactivate()  
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • storageService

        protected org.onosproject.store.service.StorageService storageService
      • pipeconfWatchdogService

        protected org.onosproject.net.pi.service.PiPipeconfWatchdogService pipeconfWatchdogService
    • Method Detail

      • activate

        public void activate()
      • deactivate

        public void deactivate()
      • getAll

        public java.util.Collection<TimedEntry<E>> getAll​(org.onosproject.net.DeviceId deviceId)
        Description copied from interface: P4RuntimeMirror
        Returns all entries for the given device ID.
        Specified by:
        getAll in interface P4RuntimeMirror<H extends org.onosproject.net.pi.runtime.PiHandle,​E extends org.onosproject.net.pi.runtime.PiEntity>
        Parameters:
        deviceId - device ID
        Returns:
        collection of table entries
      • get

        public TimedEntry<E> get​(H handle)
        Description copied from interface: P4RuntimeMirror
        Returns entry associated to the given handle, if present, otherwise null.
        Specified by:
        get in interface P4RuntimeMirror<H extends org.onosproject.net.pi.runtime.PiHandle,​E extends org.onosproject.net.pi.runtime.PiEntity>
        Parameters:
        handle - handle
        Returns:
        PI table entry
      • put

        public void put​(H handle,
                        E entry)
        Description copied from interface: P4RuntimeMirror
        Stores the given entry associating it to the given handle.
        Specified by:
        put in interface P4RuntimeMirror<H extends org.onosproject.net.pi.runtime.PiHandle,​E extends org.onosproject.net.pi.runtime.PiEntity>
        Parameters:
        handle - handle
        entry - entry
      • remove

        public void remove​(H handle)
        Description copied from interface: P4RuntimeMirror
        Removes the entry associated to the given handle.
        Specified by:
        remove in interface P4RuntimeMirror<H extends org.onosproject.net.pi.runtime.PiHandle,​E extends org.onosproject.net.pi.runtime.PiEntity>
        Parameters:
        handle - handle
      • putAnnotations

        public void putAnnotations​(H handle,
                                   org.onosproject.net.Annotations annotations)
        Description copied from interface: P4RuntimeMirror
        Stores the given annotations associating it to the given handle.
        Specified by:
        putAnnotations in interface P4RuntimeMirror<H extends org.onosproject.net.pi.runtime.PiHandle,​E extends org.onosproject.net.pi.runtime.PiEntity>
        Parameters:
        handle - handle
        annotations - entry
      • annotations

        public org.onosproject.net.Annotations annotations​(H handle)
        Description copied from interface: P4RuntimeMirror
        Returns annotations associated to the given handle, if present, otherwise null.
        Specified by:
        annotations in interface P4RuntimeMirror<H extends org.onosproject.net.pi.runtime.PiHandle,​E extends org.onosproject.net.pi.runtime.PiEntity>
        Parameters:
        handle - handle
        Returns:
        PI table annotations
      • sync

        public void sync​(org.onosproject.net.DeviceId deviceId,
                         java.util.Collection<E> entities)
        Description copied from interface: P4RuntimeMirror
        Synchronizes the state of the given device ID with the given collection of PI entities.
        Specified by:
        sync in interface P4RuntimeMirror<H extends org.onosproject.net.pi.runtime.PiHandle,​E extends org.onosproject.net.pi.runtime.PiEntity>
        Parameters:
        deviceId - device ID
        entities - collection of PI entities
      • applyWriteRequest

        public void applyWriteRequest​(org.onosproject.p4runtime.api.P4RuntimeWriteClient.WriteRequest request)
        Description copied from interface: P4RuntimeMirror
        Uses the given P4Runtime write request to update the state of this mirror by optimistically assuming that all updates in it will succeed.
        Specified by:
        applyWriteRequest in interface P4RuntimeMirror<H extends org.onosproject.net.pi.runtime.PiHandle,​E extends org.onosproject.net.pi.runtime.PiEntity>
        Parameters:
        request - P4Runtime write request
      • applyWriteResponse

        public void applyWriteResponse​(org.onosproject.p4runtime.api.P4RuntimeWriteClient.WriteResponse response)
        Description copied from interface: P4RuntimeMirror
        Uses the given P4Runtime write response to update the state of this mirror.
        Specified by:
        applyWriteResponse in interface P4RuntimeMirror<H extends org.onosproject.net.pi.runtime.PiHandle,​E extends org.onosproject.net.pi.runtime.PiEntity>
        Parameters:
        response - P4Runtime write response