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 voidclose()intgetCurrentEntityIndex()Return a small number identifying the returned entity.TickStreamgetCurrentStream()Return the current stream instance, unless it has been removed, in which case null is returned.intgetCurrentStreamIndex()Return the index of the stream that is the source of the current message.java.lang.StringgetCurrentStreamKey()Return the key of the stream that is the source of the current message.RecordClassDescriptorgetCurrentType()Returns the type of the current message.intgetCurrentTypeIndex()Returns the type index of the current message.deltix.qsrv.hf.pub.InstrumentMessagegetMessage()Returns the current message.booleanisAtEnd()booleanisClosed()booleanisRealTime()booleannext()io.aeron.logbuffer.ControlledFragmentHandler.ActiononFragment(org.agrona.DirectBuffer buffer, int offset, int length, io.aeron.logbuffer.Header header)booleanrealTimeAvailable()voidsetAvailabilityListener(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:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacedeltix.util.lang.Disposable
-
next
public boolean next()
- Specified by:
nextin 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:
onFragmentin interfaceio.aeron.logbuffer.ControlledFragmentHandler
-
getCurrentStreamKey
public java.lang.String getCurrentStreamKey()
Description copied from interface:MessageInfoReturn the key of the stream that is the source of the current message.- Specified by:
getCurrentStreamKeyin interfaceMessageInfo- Returns:
- The source stream key.
-
getCurrentStream
public TickStream getCurrentStream()
Description copied from interface:MessageInfoReturn the current stream instance, unless it has been removed, in which case null is returned.- Specified by:
getCurrentStreamin interfaceMessageInfo
-
getCurrentStreamIndex
public int getCurrentStreamIndex()
Description copied from interface:MessageInfoReturn the index of the stream that is the source of the current message.- Specified by:
getCurrentStreamIndexin interfaceMessageInfo- Returns:
- The current message source stream's index.
-
getCurrentType
public RecordClassDescriptor getCurrentType()
Description copied from interface:TypedMessageSourceReturns the type of the current message.- Specified by:
getCurrentTypein interfaceTypedMessageSource- Returns:
- The current message type.
-
getCurrentTypeIndex
public int getCurrentTypeIndex()
Description copied from interface:TypedMessageSourceReturns the type index of the current message.- Specified by:
getCurrentTypeIndexin interfaceTypedMessageSource- Returns:
- The current message type index.
-
getMessage
public deltix.qsrv.hf.pub.InstrumentMessage getMessage()
Description copied from interface:MessageInfoReturns the current message.- Specified by:
getMessagein interfaceMessageInfo- Specified by:
getMessagein interfacedeltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
-
isAtEnd
public boolean isAtEnd()
- Specified by:
isAtEndin interfacedeltix.util.concurrent.AbstractCursor
-
getCurrentEntityIndex
public int getCurrentEntityIndex()
Description copied from interface:MessageInfoReturn 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:
getCurrentEntityIndexin interfaceMessageInfo- See Also:
EntitySubscriptionController
-
setAvailabilityListener
public void setAvailabilityListener(java.lang.Runnable lnr)
-
isRealTime
public boolean isRealTime()
- Specified by:
isRealTimein 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:
realTimeAvailablein 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.
-
-