Package org.epics.pvaccess.impl.remote
Class IntrospectionRegistry
- java.lang.Object
-
- org.epics.pvaccess.impl.remote.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 Summary
Fields Modifier and Type Field Description static byte
FULL_WITH_ID_TYPE_CODE
Serialization contains an ID (that can be used later, if cached) and full interface description.static byte
NULL_TYPE_CODE
Null type.static byte
ONLY_ID_TYPE_CODE
Serialization contains only an ID (that was assigned by one of the previousFULL_WITH_ID
descriptions).protected short
pointer
protected Map<Short,org.epics.pvdata.pv.Field>
registry
-
Constructor Summary
Constructors Constructor Description IntrospectionRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.epics.pvdata.pv.Field
deserialize(ByteBuffer buffer, org.epics.pvdata.pv.DeserializableControl control)
org.epics.pvdata.pv.Field
getIntrospectionInterface(short id)
Get introspection interface for given ID.void
registerIntrospectionInterface(short id, org.epics.pvdata.pv.Field field)
Register introspection interface with given ID.short
registerIntrospectionInterface(org.epics.pvdata.pv.Field field, BooleanHolder existing)
Register introspection interface and get it's ID.void
reset()
Reset registry, i.e.void
serialize(org.epics.pvdata.pv.Field field, ByteBuffer buffer, org.epics.pvdata.pv.SerializableControl control)
-
-
-
Field Detail
-
pointer
protected short pointer
-
NULL_TYPE_CODE
public static final byte NULL_TYPE_CODE
Null type.- See Also:
- Constant Field Values
-
ONLY_ID_TYPE_CODE
public static final byte ONLY_ID_TYPE_CODE
Serialization contains only an ID (that was assigned by one of the previousFULL_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
-
-
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)
-
-