Class TickCursorClientAeron
- java.lang.Object
- 
- deltix.qsrv.hf.tickdb.comm.client.TickCursorClientAeron
 
- 
- All Implemented Interfaces:
- deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage>,- RealTimeMessageSource<deltix.qsrv.hf.pub.InstrumentMessage>,- EntityAndTypeSubscriptionController,- EntitySubscriptionController,- InstrumentMessageSource,- MessageInfo,- StreamSubscriptionController,- SubscriptionController,- SubscriptionInfo,- SubscriptionManager,- SymbolAndTypeSubscriptionController,- SymbolAndTypeSubscriptionControllerClient,- SymbolSubscriptionController,- TimeController,- TypedMessageSource,- TypeSubscriptionController,- TickCursor,- deltix.util.concurrent.AbstractCursor,- deltix.util.concurrent.IntermittentlyAvailableCursor,- deltix.util.concurrent.IntermittentlyAvailableResource,- deltix.util.lang.Disposable,- io.aeron.logbuffer.ControlledFragmentHandler,- java.io.Closeable,- java.lang.AutoCloseable
 
 public class TickCursorClientAeron extends java.lang.Object implements TickCursor, SubscriptionManager, deltix.util.concurrent.IntermittentlyAvailableCursor, io.aeron.logbuffer.ControlledFragmentHandler, SymbolAndTypeSubscriptionControllerClient 
- 
- 
Field Summary- 
Fields inherited from interface deltix.qsrv.hf.tickdb.pub.query.SymbolAndTypeSubscriptionControllerClientALL_TYPES, LENGTH
 
- 
 - 
Constructor SummaryConstructors Constructor Description TickCursorClientAeron(deltix.qsrv.hf.tickdb.comm.client.DXRemoteDB db, VSChannel channel, SelectionOptions options, long time, boolean allEntitiesSubscribed, boolean allTypesSubscribed, InstrumentToObjectMap<java.lang.Long> subscribedEntities, java.util.HashSet<java.lang.String> subscribedTypes, java.util.HashSet<TickStream> subscribedStreams, io.aeron.Aeron aeron, int aeronDataStreamId, int aeronCommandStreamId, DXAeronSubscriptionChecker subscriptionChecker)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(deltix.qsrv.hf.pub.InstrumentIdentity[] ids, java.lang.String[] types)Add the specified entities and types to subscription.voidaddEntities(deltix.qsrv.hf.pub.InstrumentIdentity[] ids, int offset, int length)Bulk add the specified entities to subscription.voidaddEntity(deltix.qsrv.hf.pub.InstrumentIdentity id)Add the specified entity to subscription.voidaddStream(TickStream... tickStreams)Add streams to subscription.voidaddTypes(java.lang.String... names)Add the specified type names to subscription.voidclearAllEntities()Switch to selective subscription mode (if necessary) and clear the list.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.deltix.qsrv.hf.pub.InstrumentIdentity[]getSubscribedEntities()Get the specified entities of the current subscription.java.lang.String[]getSubscribedTypes()Get the specified type names of the current subscription.booleanhasSubscribedTypes()Indicates true if types subscription is not empty.booleanisAllEntitiesSubscribed()Indicates that all entities subscribed (no filtering).booleanisAllTypesSubscribed()Indicates that all types subscribed (no filtering).booleanisAtEnd()booleanisClosed()booleanisRealTime()booleannext()deltix.util.concurrent.NextResultnextIfAvailable()io.aeron.logbuffer.ControlledFragmentHandler.ActiononFragment(org.agrona.DirectBuffer buffer, int offset, int length, io.aeron.logbuffer.Header header)booleanrealTimeAvailable()voidremove(deltix.qsrv.hf.pub.InstrumentIdentity[] ids, java.lang.String[] types)Remove the specified entities and types from subscription.voidremoveAllStreams()Remove all streams from subscription.voidremoveEntities(deltix.qsrv.hf.pub.InstrumentIdentity[] ids, int offset, int length)Remove the specified entities from subscription.voidremoveEntity(deltix.qsrv.hf.pub.InstrumentIdentity id)Remove the specified entity from subscription.voidremoveStream(TickStream... tickStreams)Remove streams from subscription.voidremoveTypes(java.lang.String... names)Remove the specified types from subscription.voidreset(long time)Reposition the message source to a new point in time, while preserving current subscription.voidsetAvailabilityListener(java.lang.Runnable lnr)voidsetTimeForNewSubscriptions(long time)This method affects subsequent "add subscription" methods, such as, for instance, addEntity ().voidsetTypes(java.lang.String... names)Subscribe to specified types.voidsubscribeToAllEntities()Subscribe to all available entities.voidsubscribeToAllTypes()Subscribe to all available types (no filtering).static voidwriteStreamKeys(java.io.DataOutputStream out, TickStream[] streams)- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface deltix.qsrv.hf.tickdb.pub.query.EntitySubscriptionControlleraddEntities, removeEntities
 - 
Methods inherited from interface deltix.qsrv.hf.tickdb.pub.query.SubscriptionInfogetSubscribedSymbols, isAllSymbolsSubscribed
 - 
Methods inherited from interface deltix.qsrv.hf.tickdb.pub.query.SymbolAndTypeSubscriptionControllerClientadd, addSymbol, addSymbols, clearAllSymbols, remove, removeSymbol, removeSymbols, subscribeToAllSymbols
 - 
Methods inherited from interface deltix.qsrv.hf.tickdb.pub.query.SymbolSubscriptionControlleraddSymbols, removeSymbols
 
- 
 
- 
- 
- 
Constructor Detail- 
TickCursorClientAeronpublic TickCursorClientAeron(deltix.qsrv.hf.tickdb.comm.client.DXRemoteDB db, VSChannel channel, SelectionOptions options, long time, boolean allEntitiesSubscribed, boolean allTypesSubscribed, InstrumentToObjectMap<java.lang.Long> subscribedEntities, java.util.HashSet<java.lang.String> subscribedTypes, java.util.HashSet<TickStream> subscribedStreams, io.aeron.Aeron aeron, int aeronDataStreamId, int aeronCommandStreamId, DXAeronSubscriptionChecker subscriptionChecker)
 
- 
 - 
Method Detail- 
setTimeForNewSubscriptionspublic void setTimeForNewSubscriptions(long time) Description copied from interface:TimeControllerThis method affects subsequent "add subscription" methods, such as, for instance, addEntity (). New subscriptions start at the specified time.- Specified by:
- setTimeForNewSubscriptionsin interface- TimeController
- Parameters:
- time- The time to use, or- TimeConstants.USE_CURRENT_TIMEto use server's system time, or- TimeConstants.USE_CURSOR_TIMEto use cursor's last read time.
 
 - 
isClosedpublic boolean isClosed() - Specified by:
- isClosedin interface- InstrumentMessageSource
 
 - 
closepublic void close() - Specified by:
- closein interface- java.lang.AutoCloseable
- Specified by:
- closein interface- java.io.Closeable
- Specified by:
- closein interface- deltix.util.lang.Disposable
 
 - 
addStreampublic void addStream(TickStream... tickStreams) Description copied from interface:StreamSubscriptionControllerAdd streams to subscription. Current time and filter is used to query data from new sources.- Specified by:
- addStreamin interface- StreamSubscriptionController
- Parameters:
- tickStreams- Streams to add.
 
 - 
removeStreampublic void removeStream(TickStream... tickStreams) Description copied from interface:StreamSubscriptionControllerRemove streams from subscription.- Specified by:
- removeStreamin interface- StreamSubscriptionController
- Parameters:
- tickStreams- Streams to remove.
 
 - 
writeStreamKeyspublic static void writeStreamKeys(java.io.DataOutputStream out, TickStream[] streams) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
removeAllStreamspublic void removeAllStreams() Description copied from interface:StreamSubscriptionControllerRemove all streams from subscription.- Specified by:
- removeAllStreamsin interface- StreamSubscriptionController
 
 - 
resetpublic void reset(long time) Description copied from interface:TimeControllerReposition the message source to a new point in time, while preserving current subscription.- Specified by:
- resetin interface- TimeController
- Parameters:
- time- The new position in time.
 
 - 
clearAllEntitiespublic void clearAllEntities() Description copied from interface:EntitySubscriptionControllerSwitch to selective subscription mode (if necessary) and clear the list.- Specified by:
- clearAllEntitiesin interface- EntitySubscriptionController
 
 - 
subscribeToAllEntitiespublic void subscribeToAllEntities() Description copied from interface:EntitySubscriptionControllerSubscribe to all available entities.- Specified by:
- subscribeToAllEntitiesin interface- EntitySubscriptionController
 
 - 
removeEntitypublic void removeEntity(deltix.qsrv.hf.pub.InstrumentIdentity id) Description copied from interface:EntitySubscriptionControllerRemove the specified entity from subscription. The type and symbol are copied from the incoming object, if necessary, so the argument can be re-used after the call.- Specified by:
- removeEntityin interface- EntitySubscriptionController
 
 - 
removeEntitiespublic void removeEntities(deltix.qsrv.hf.pub.InstrumentIdentity[] ids, int offset, int length)Description copied from interface:EntitySubscriptionControllerRemove the specified entities from subscription. The type and symbol are copied from the incoming objects, if necessary, so the arguments can be re-used after the call.- Specified by:
- removeEntitiesin interface- EntitySubscriptionController
 
 - 
addEntitypublic void addEntity(deltix.qsrv.hf.pub.InstrumentIdentity id) Description copied from interface:EntitySubscriptionControllerAdd the specified entity to subscription. The type and symbol are copied from the incoming object, if necessary, so the argument can be re-used after the call. Special note about options: The following fragment will subscribe to specific option contract "DAV 100417P00085000":addEntity(new InstrumentKey(InstrumentType.OPTION, "DAV 100417P00085000"));While the following will subscribe to option root (and you will get all instruments with this root):addEntity(new InstrumentKey(InstrumentType.OPTION, "DAV "));- Specified by:
- addEntityin interface- EntitySubscriptionController
 
 - 
addEntitiespublic void addEntities(deltix.qsrv.hf.pub.InstrumentIdentity[] ids, int offset, int length)Description copied from interface:EntitySubscriptionControllerBulk add the specified entities to subscription. The type and symbol are copied from the incoming objects, if necessary, so the arguments can be re-used after the call.- Specified by:
- addEntitiesin interface- EntitySubscriptionController
 
 - 
getSubscribedEntitiespublic deltix.qsrv.hf.pub.InstrumentIdentity[] getSubscribedEntities() Description copied from interface:SubscriptionInfoGet the specified entities of the current subscription.- Specified by:
- getSubscribedEntitiesin interface- SubscriptionInfo
- Returns:
- not-nullable array of subscribed entities.
 
 - 
isAllEntitiesSubscribedpublic boolean isAllEntitiesSubscribed() Description copied from interface:SubscriptionInfoIndicates that all entities subscribed (no filtering).- Specified by:
- isAllEntitiesSubscribedin interface- SubscriptionInfo
- Returns:
- true if all entities subscribed.
 
 - 
getSubscribedTypespublic java.lang.String[] getSubscribedTypes() Description copied from interface:SubscriptionInfoGet the specified type names of the current subscription.- Specified by:
- getSubscribedTypesin interface- SubscriptionInfo
- Returns:
- not-nullable array of subscribed type names.
 
 - 
isAllTypesSubscribedpublic boolean isAllTypesSubscribed() Description copied from interface:SubscriptionInfoIndicates that all types subscribed (no filtering).- Specified by:
- isAllTypesSubscribedin interface- SubscriptionInfo
- Returns:
- true if all types subscribed.
 
 - 
hasSubscribedTypespublic boolean hasSubscribedTypes() Description copied from interface:SubscriptionInfoIndicates true if types subscription is not empty.- Specified by:
- hasSubscribedTypesin interface- SubscriptionInfo
- Returns:
- true if at least one type was subscribed.
 
 - 
subscribeToAllTypespublic void subscribeToAllTypes() Description copied from interface:TypeSubscriptionControllerSubscribe to all available types (no filtering).- Specified by:
- subscribeToAllTypesin interface- TypeSubscriptionController
 
 - 
setTypespublic void setTypes(java.lang.String... names) Description copied from interface:TypeSubscriptionControllerSubscribe to specified types.- Specified by:
- setTypesin interface- TypeSubscriptionController
 
 - 
addTypespublic void addTypes(java.lang.String... names) Description copied from interface:TypeSubscriptionControllerAdd the specified type names to subscription.- Specified by:
- addTypesin interface- TypeSubscriptionController
 
 - 
addpublic void add(deltix.qsrv.hf.pub.InstrumentIdentity[] ids, java.lang.String[] types)Description copied from interface:EntityAndTypeSubscriptionControllerAdd the specified entities and types to subscription. The type and symbol are copied from the incoming object, if necessary, so the argument can be re-used after the call.- Specified by:
- addin interface- EntityAndTypeSubscriptionController
- Parameters:
- ids- not-null array of instruments to subscribe.
- types- not-null array of type names to subscribe.
 
 - 
removepublic void remove(deltix.qsrv.hf.pub.InstrumentIdentity[] ids, java.lang.String[] types)Description copied from interface:EntityAndTypeSubscriptionControllerRemove the specified entities and types from subscription. The type and symbol are copied from the incoming objects, if necessary, so the arguments can be re-used after the call.- Specified by:
- removein interface- EntityAndTypeSubscriptionController
- Parameters:
- ids- not-null array of instruments to subscribe.
- types- not-null array of type names to subscribe.
 
 - 
removeTypespublic void removeTypes(java.lang.String... names) Description copied from interface:TypeSubscriptionControllerRemove the specified types from subscription.- Specified by:
- removeTypesin interface- TypeSubscriptionController
 
 - 
nextIfAvailablepublic deltix.util.concurrent.NextResult nextIfAvailable() - Specified by:
- nextIfAvailablein interface- deltix.util.concurrent.IntermittentlyAvailableCursor
 
 - 
nextpublic boolean next() - Specified by:
- nextin interface- deltix.util.concurrent.AbstractCursor
 
 - 
onFragmentpublic io.aeron.logbuffer.ControlledFragmentHandler.Action onFragment(org.agrona.DirectBuffer buffer, int offset, int length, io.aeron.logbuffer.Header header)- Specified by:
- onFragmentin interface- io.aeron.logbuffer.ControlledFragmentHandler
 
 - 
getCurrentStreamKeypublic 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 interface- MessageInfo
- Returns:
- The source stream key.
 
 - 
getCurrentStreampublic 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 interface- MessageInfo
 
 - 
getCurrentStreamIndexpublic int getCurrentStreamIndex() Description copied from interface:MessageInfoReturn the index of the stream that is the source of the current message.- Specified by:
- getCurrentStreamIndexin interface- MessageInfo
- Returns:
- The current message source stream's index.
 
 - 
getCurrentTypepublic RecordClassDescriptor getCurrentType() Description copied from interface:TypedMessageSourceReturns the type of the current message.- Specified by:
- getCurrentTypein interface- TypedMessageSource
- Returns:
- The current message type.
 
 - 
getCurrentTypeIndexpublic int getCurrentTypeIndex() Description copied from interface:TypedMessageSourceReturns the type index of the current message.- Specified by:
- getCurrentTypeIndexin interface- TypedMessageSource
- Returns:
- The current message type index.
 
 - 
getMessagepublic deltix.qsrv.hf.pub.InstrumentMessage getMessage() Description copied from interface:MessageInfoReturns the current message.- Specified by:
- getMessagein interface- InstrumentMessageSource
- Specified by:
- getMessagein interface- MessageInfo
- Specified by:
- getMessagein interface- deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
 
 - 
isAtEndpublic boolean isAtEnd() - Specified by:
- isAtEndin interface- deltix.util.concurrent.AbstractCursor
 
 - 
getCurrentEntityIndexpublic 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 interface- MessageInfo
- See Also:
- EntitySubscriptionController
 
 - 
setAvailabilityListenerpublic void setAvailabilityListener(java.lang.Runnable lnr) - Specified by:
- setAvailabilityListenerin interface- deltix.util.concurrent.IntermittentlyAvailableResource
 
 - 
isRealTimepublic boolean isRealTime() - Specified by:
- isRealTimein interface- RealTimeMessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
- Returns:
- true if this source already switched from historical to real-time data portion
 
 - 
realTimeAvailablepublic boolean realTimeAvailable() - Specified by:
- realTimeAvailablein interface- RealTimeMessageSource<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.
 
 
- 
 
-