Package deltix.qsrv.hf.topic
Class DirectProtocol
- java.lang.Object
-
- deltix.qsrv.hf.topic.DirectProtocol
-
public class DirectProtocol extends java.lang.ObjectCommunication types:- A) From Loader to Consumer - Metadata and Message Data - high traffic. Low latency required. Aeron.
- B) From Loader to Server - Metadata (temporary entity ids), latency can be high. VSChannel.
- C) From Server to Loader - Metadata (permanent entity ids), latency can be high. Aeron (we could use sockets but we need fast non-blocking implementation).
- D) From Loader to Server and from Server to Loader - new loader registration process. Executed once per loader.
- E) From Consumer to Server and from Server to Consumer - new consumer registration process. Executed once per consumer.
- Consumer reads data only from E-type channel.
- Loader must send permanent entity index to client as soon as it known to loader. That's not server's responsibility.
- Server always responds to loader with all requested symbols
- Types are defined upon topic creation and can't be changed
- Entities can be initialized upon topic creation. So all loaders will know such entities upon start.
- Entities can be added/updated upon loader creation. Each loader get full list of known entities upon start.
- Entities can be added by any loader on the fly. Such entities get temporary ID. Loader is responsible to send that temporary mapping to topic server. Topic server will assign permanent id
-
-
Field Summary
Fields Modifier and Type Field Description static intAFTER_CODE_OFFSETstatic byteCODE_END_OF_STREAMstatic byteCODE_METADATAstatic byteCODE_MSGstatic intCODE_OFFSETstatic byteCODE_TEMP_INDEX_REMOVEDstatic intDATA_OFFSETstatic intEND_OF_STREAM_DATA_OFFSETstatic intENTITY_OFFSETstatic intMAX_PUBLISHER_NUMBERstatic intMETADATA_OFFSETstatic intREQUIRED_HEADER_SIZEstatic intTEMP_INDEX_REMOVED_DATA_OFFSETstatic intTIME_OFFSETstatic intTYPE_OFFSET
-
Constructor Summary
Constructors Constructor Description DirectProtocol()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetFirstTempEntryIndex(int publisherNumber)static intgetMaxTempEntryIndex(int publisherNumber)static intgetMinTempEntryIndex(int publisherNumber)static intgetPublisherNumberFromTempIndex(int entityIndex)static booleanisTempIndex(int entityIndex)static booleanisValidPermanentIndex(int entityIndex)static booleanisValidTempIndex(int entityIndex)More strict check than inisTempIndex(int).
-
-
-
Field Detail
-
CODE_MSG
public static final byte CODE_MSG
- See Also:
- Constant Field Values
-
CODE_METADATA
public static final byte CODE_METADATA
- See Also:
- Constant Field Values
-
CODE_TEMP_INDEX_REMOVED
public static final byte CODE_TEMP_INDEX_REMOVED
- See Also:
- Constant Field Values
-
CODE_END_OF_STREAM
public static final byte CODE_END_OF_STREAM
- See Also:
- Constant Field Values
-
CODE_OFFSET
public static final int CODE_OFFSET
-
AFTER_CODE_OFFSET
public static final int AFTER_CODE_OFFSET
-
TYPE_OFFSET
public static final int TYPE_OFFSET
-
ENTITY_OFFSET
public static final int ENTITY_OFFSET
-
TIME_OFFSET
public static final int TIME_OFFSET
-
DATA_OFFSET
public static final int DATA_OFFSET
-
REQUIRED_HEADER_SIZE
public static final int REQUIRED_HEADER_SIZE
-
METADATA_OFFSET
public static final int METADATA_OFFSET
-
TEMP_INDEX_REMOVED_DATA_OFFSET
public static final int TEMP_INDEX_REMOVED_DATA_OFFSET
-
MAX_PUBLISHER_NUMBER
public static final int MAX_PUBLISHER_NUMBER
- See Also:
- Constant Field Values
-
END_OF_STREAM_DATA_OFFSET
public static final int END_OF_STREAM_DATA_OFFSET
-
-
Method Detail
-
getFirstTempEntryIndex
public static int getFirstTempEntryIndex(int publisherNumber)
-
getMinTempEntryIndex
public static int getMinTempEntryIndex(int publisherNumber)
-
getMaxTempEntryIndex
public static int getMaxTempEntryIndex(int publisherNumber)
-
getPublisherNumberFromTempIndex
public static int getPublisherNumberFromTempIndex(int entityIndex)
-
isValidTempIndex
public static boolean isValidTempIndex(int entityIndex)
More strict check than inisTempIndex(int). The difference is that we treat value -1 as invalid temp index because it's not permitted as value. This is done because we want to use value "-1" as "NOT_FOUND" value in lookups.
-
isTempIndex
public static boolean isTempIndex(int entityIndex)
-
isValidPermanentIndex
public static boolean isValidPermanentIndex(int entityIndex)
-
-