Class IntrospectionRegistry


  • public final class IntrospectionRegistry
    extends Object
    PVData Structure registry. Registry is used to cache introspection interfaces to minimize network traffic. This class is not thread safe (optimized to be used only by one thread).
    Author:
    msekoranja
    • Field Detail

      • registry

        protected Map<Short,​org.epics.pvdata.pv.Field> registry
      • pointer

        protected short pointer
      • ONLY_ID_TYPE_CODE

        public static final byte ONLY_ID_TYPE_CODE
        Serialization contains only an ID (that was assigned by one of the previous FULL_WITH_ID descriptions).
        See Also:
        Constant Field Values
      • FULL_WITH_ID_TYPE_CODE

        public static final byte FULL_WITH_ID_TYPE_CODE
        Serialization contains an ID (that can be used later, if cached) and full interface description.
        See Also:
        Constant Field Values
    • Constructor Detail

      • IntrospectionRegistry

        public IntrospectionRegistry()
    • Method Detail

      • reset

        public void reset()
        Reset registry, i.e. must be done when transport is changed (server restarted).
      • getIntrospectionInterface

        public org.epics.pvdata.pv.Field getIntrospectionInterface​(short id)
        Get introspection interface for given ID.
        Parameters:
        id - the ID.
        Returns:
        Field instance for given ID.
      • registerIntrospectionInterface

        public void registerIntrospectionInterface​(short id,
                                                   org.epics.pvdata.pv.Field field)
        Register introspection interface with given ID.
        Parameters:
        id - ID to use to register.
        field - field to register.
      • registerIntrospectionInterface

        public short registerIntrospectionInterface​(org.epics.pvdata.pv.Field field,
                                                    BooleanHolder existing)
        Register introspection interface and get it's ID. Always OUTGOING. If it is already registered only preassigned ID is returned.
        Parameters:
        field - field to register.
        existing - indication whether the field was already registered.
        Returns:
        id of given Field
      • serialize

        public final void serialize​(org.epics.pvdata.pv.Field field,
                                    ByteBuffer buffer,
                                    org.epics.pvdata.pv.SerializableControl control)
      • deserialize

        public final org.epics.pvdata.pv.Field deserialize​(ByteBuffer buffer,
                                                           org.epics.pvdata.pv.DeserializableControl control)