Class TickCursorClientAeronMulticast
- java.lang.Object
-
- deltix.qsrv.hf.tickdb.comm.client.TickCursorClientAeronMulticast
-
- All Implemented Interfaces:
deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
,RealTimeMessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
,MessageInfo
,TypedMessageSource
,deltix.util.concurrent.AbstractCursor
,deltix.util.lang.Disposable
,io.aeron.logbuffer.ControlledFragmentHandler
,java.io.Closeable
,java.lang.AutoCloseable
public class TickCursorClientAeronMulticast extends java.lang.Object implements deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage>, RealTimeMessageSource<deltix.qsrv.hf.pub.InstrumentMessage>, io.aeron.logbuffer.ControlledFragmentHandler, MessageInfo
-
-
Constructor Summary
Constructors Constructor Description TickCursorClientAeronMulticast(deltix.qsrv.hf.tickdb.comm.client.DXRemoteDB db, VSChannel channel, boolean raw, TickStream stream, DXAeronSubscriptionChecker subscriptionChecker, int aeronDataStreamId, io.aeron.Aeron aeron, java.lang.String aeronChannel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
getCurrentEntityIndex()
Return a small number identifying the returned entity.TickStream
getCurrentStream()
Return the current stream instance, unless it has been removed, in which case null is returned.int
getCurrentStreamIndex()
Return the index of the stream that is the source of the current message.java.lang.String
getCurrentStreamKey()
Return the key of the stream that is the source of the current message.RecordClassDescriptor
getCurrentType()
Returns the type of the current message.int
getCurrentTypeIndex()
Returns the type index of the current message.deltix.qsrv.hf.pub.InstrumentMessage
getMessage()
Returns the current message.boolean
isAtEnd()
boolean
isClosed()
boolean
isRealTime()
boolean
next()
io.aeron.logbuffer.ControlledFragmentHandler.Action
onFragment(org.agrona.DirectBuffer buffer, int offset, int length, io.aeron.logbuffer.Header header)
boolean
realTimeAvailable()
void
setAvailabilityListener(java.lang.Runnable lnr)
-
-
-
Constructor Detail
-
TickCursorClientAeronMulticast
public TickCursorClientAeronMulticast(deltix.qsrv.hf.tickdb.comm.client.DXRemoteDB db, VSChannel channel, boolean raw, TickStream stream, DXAeronSubscriptionChecker subscriptionChecker, int aeronDataStreamId, io.aeron.Aeron aeron, java.lang.String aeronChannel)
-
-
Method Detail
-
isClosed
public boolean isClosed()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfacedeltix.util.lang.Disposable
-
next
public boolean next()
- Specified by:
next
in interfacedeltix.util.concurrent.AbstractCursor
-
onFragment
public io.aeron.logbuffer.ControlledFragmentHandler.Action onFragment(org.agrona.DirectBuffer buffer, int offset, int length, io.aeron.logbuffer.Header header)
- Specified by:
onFragment
in interfaceio.aeron.logbuffer.ControlledFragmentHandler
-
getCurrentStreamKey
public java.lang.String getCurrentStreamKey()
Description copied from interface:MessageInfo
Return the key of the stream that is the source of the current message.- Specified by:
getCurrentStreamKey
in interfaceMessageInfo
- Returns:
- The source stream key.
-
getCurrentStream
public TickStream getCurrentStream()
Description copied from interface:MessageInfo
Return the current stream instance, unless it has been removed, in which case null is returned.- Specified by:
getCurrentStream
in interfaceMessageInfo
-
getCurrentStreamIndex
public int getCurrentStreamIndex()
Description copied from interface:MessageInfo
Return the index of the stream that is the source of the current message.- Specified by:
getCurrentStreamIndex
in interfaceMessageInfo
- Returns:
- The current message source stream's index.
-
getCurrentType
public RecordClassDescriptor getCurrentType()
Description copied from interface:TypedMessageSource
Returns the type of the current message.- Specified by:
getCurrentType
in interfaceTypedMessageSource
- Returns:
- The current message type.
-
getCurrentTypeIndex
public int getCurrentTypeIndex()
Description copied from interface:TypedMessageSource
Returns the type index of the current message.- Specified by:
getCurrentTypeIndex
in interfaceTypedMessageSource
- Returns:
- The current message type index.
-
getMessage
public deltix.qsrv.hf.pub.InstrumentMessage getMessage()
Description copied from interface:MessageInfo
Returns the current message.- Specified by:
getMessage
in interfaceMessageInfo
- Specified by:
getMessage
in interfacedeltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
-
isAtEnd
public boolean isAtEnd()
- Specified by:
isAtEnd
in interfacedeltix.util.concurrent.AbstractCursor
-
getCurrentEntityIndex
public int getCurrentEntityIndex()
Description copied from interface:MessageInfo
Return a small number identifying the returned entity. This number is unique throughout the life of the message source. Removing entities from subscription does not create reusable holes in the "space" of entity indexes.- Specified by:
getCurrentEntityIndex
in interfaceMessageInfo
- See Also:
EntitySubscriptionController
-
setAvailabilityListener
public void setAvailabilityListener(java.lang.Runnable lnr)
-
isRealTime
public boolean isRealTime()
- Specified by:
isRealTime
in interfaceRealTimeMessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
- Returns:
- true if this source already switched from historical to real-time data portion
-
realTimeAvailable
public boolean realTimeAvailable()
- Specified by:
realTimeAvailable
in interfaceRealTimeMessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
- Returns:
- true if source can be switched in real-time.
When realtime mode is available client can use method
RealTimeMessageSource.isRealTime()
()} to detect switch from historical to real-time portion of data. Also in this mode client will receive special messageRealTimeStartMessage
.
-
-