Interface TickDB

  • All Superinterfaces:
    deltix.util.io.AbstractDataStore, java.lang.AutoCloseable, java.io.Closeable, deltix.util.lang.Disposable
    All Known Subinterfaces:
    DXTickDB, RemoteTickDB, WritableTickDB
    All Known Implementing Classes:
    DirectTickDBClient, SecuredDbClient, TickDBClient, UserDBClient

    public interface TickDB
    extends deltix.util.io.AbstractDataStore

    The top-level interface to the read-only methods of the Deltix Tick Database engine. Instances of this interface are created by static methods of TickDBFactory.

    At the logical level, a database consists of a number of so-called streams. Each stream is a time series of messages for a number of financial instruments ("entities"). Messages can be price bars (see BarMessage), trade tics (see TradeMessage), or bid/offer tics (see BestBidOfferMessage). In the simplest case, a database will have a single stream of data. Multiple streams can be used to represent data of different frequencies, or completely different factors. For instance, separate streams can represent 1-minute price bars and tics for the same set of entities. Or, you can have price bars and volatility bars in separate streams.

    • Method Detail

      • getStream

        TickStream getStream​(java.lang.String key)
        Looks up an existing stream by key.
        Parameters:
        key - Identifies the stream.
        Returns:
        A stream object, or null if the key was not found.
        Throws:
        java.security.AccessControlException - when user is not authorized to READ given stream
      • listStreams

        TickStream[] listStreams()
        Enumerates existing streams.
        Returns:
        An array of existing stream objects.
      • createCursor

        TickCursor createCursor​(SelectionOptions options,
                                TickStream... streams)

        Opens an initially empty cursor for reading data from multiple streams, according to the specified options. The messages are returned from the cursor strictly ordered by time. Within the same exact time stamp, the order of messages is undefined and may vary from call to call, i.e. it is non-deterministic.

        The cursor is returned initially empty and must be reset. The TickCursor interface provides methods for dynamically re-configuring the subscription, or jumping to a different timestamp.

        Parameters:
        options - Selection options.
        streams - Streams from which data will be selected.
        Returns:
        A cursor used to read messages.
      • select

        TickCursor select​(long time,
                          SelectionOptions options,
                          java.lang.String[] types,
                          deltix.qsrv.hf.pub.InstrumentIdentity[] entities,
                          TickStream... streams)

        Opens a cursor for reading data from multiple streams, according to the specified options. The messages are returned from the cursor strictly ordered by time. Within the same exact time stamp, the order of messages is undefined and may vary from call to call, i.e. it is non-deterministic.

        Note that the arguments of this method only determine the initial configuration of the cursor. The TickCursor interface provides methods for dynamically re-configuring the subscription, or jumping to a different timestamp.

        Parameters:
        time - The start timestamp.
        options - Selection options.
        entities - Specified entities to be subscribed. If null, then all entities will be subscribed.
        types - Specified message types to be subscribed. If null, then all types will be subscribed.
        streams - Streams from which data will be selected.
        Returns:
        A cursor used to read messages.