Interface DXTickDB
-
- All Superinterfaces:
deltix.util.io.AbstractDataStore
,java.lang.AutoCloseable
,java.io.Closeable
,deltix.util.lang.Disposable
,TickDB
,WritableTickDB
- All Known Subinterfaces:
RemoteTickDB
- All Known Implementing Classes:
DirectTickDBClient
,SecuredDbClient
,TickDBClient
,UserDBClient
public interface DXTickDB extends WritableTickDB
Methods specific to the Deltix implementation of WritableTickDB.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
coolDown()
Removes all memory indexes.DXTickStream
createAnonymousStream(StreamOptions options)
Deprecated.DXTickStream
createFileStream(java.lang.String key, java.lang.String dataFile)
Creates a new stream mount to the given data file.DXTickStream
createStream(java.lang.String key, StreamOptions options)
Creates a new stream within the database.DXTickStream
createStream(java.lang.String key, java.lang.String name, java.lang.String description, int distributionFactor)
Creates a new stream within the database.ClassSet
describeQuery(java.lang.String qql, SelectionOptions options, Parameter... params)
Returns schema for the given query.InstrumentMessageSource
executeQuery(deltix.util.parsers.Element qql, SelectionOptions options, TickStream[] streams, deltix.qsrv.hf.pub.InstrumentIdentity[] ids, long startTimestamp, long endTimestamp, Parameter... params)
Execute Query and creates a message source for reading data from it, according to the specified options.InstrumentMessageSource
executeQuery(deltix.util.parsers.Element qql, SelectionOptions options, TickStream[] streams, deltix.qsrv.hf.pub.InstrumentIdentity[] ids, long time, Parameter... params)
Execute Query and creates a message source for reading data from it, according to the specified options.InstrumentMessageSource
executeQuery(java.lang.String qql, Parameter... params)
Execute Query and creates a message source for reading data from it, according to the specified options.InstrumentMessageSource
executeQuery(java.lang.String qql, SelectionOptions options, deltix.qsrv.hf.pub.InstrumentIdentity[] ids, Parameter... params)
Execute Query and creates a message source for reading data from it, according to the specified options.InstrumentMessageSource
executeQuery(java.lang.String qql, SelectionOptions options, Parameter... params)
Execute Query and creates a message source for reading data from it, according to the specified options.InstrumentMessageSource
executeQuery(java.lang.String qql, SelectionOptions options, TickStream[] streams, deltix.qsrv.hf.pub.InstrumentIdentity[] ids, long startTimestamp, long endTimestamp, Parameter... params)
Execute Query and creates a message source for reading data from it, according to the specified options.InstrumentMessageSource
executeQuery(java.lang.String qql, SelectionOptions options, TickStream[] streams, deltix.qsrv.hf.pub.InstrumentIdentity[] ids, long time, Parameter... params)
Execute Query and creates a message source for reading data from it, according to the specified options.java.io.File[]
getDbDirs()
MetaData<RecordClassDescriptor>
getMetaData()
Gets stream metadata contains all class descriptors.long
getMetaDataVersion()
Gets current metadata version.long
getServerTime()
Returns system time of the timebase server.long
getSizeOnDisk()
Returns the approximate size of the database's footprint.DXTickStream
getStream(java.lang.String key)
Looks up an existing stream by key.TopicDB
getTopicDB()
Topic API.boolean
isTopicDBSupported()
DXChannel[]
listChannels()
DXTickStream[]
listStreams()
Enumerates existing streams.void
setGrowthPolicy(deltix.util.lang.GrowthPolicy policy)
Sets the file growth policyvoid
trimToSize()
Trims all data files to minimum size.void
warmUp()
Forces the building of all memory indexes.
-
-
-
Method Detail
-
warmUp
void warmUp()
Forces the building of all memory indexes. This is useful in performance testing or on server startup.
-
coolDown
void coolDown()
Removes all memory indexes. The indexes will be rebuilt on demand.
-
trimToSize
void trimToSize()
Trims all data files to minimum size.
-
getSizeOnDisk
long getSizeOnDisk()
Returns the approximate size of the database's footprint.- Returns:
- Size in bytes.
-
getStream
DXTickStream getStream(java.lang.String key)
Description copied from interface:WritableTickDB
Looks up an existing stream by key.- Specified by:
getStream
in interfaceTickDB
- Specified by:
getStream
in interfaceWritableTickDB
- Parameters:
key
- Identifies the stream.- Returns:
- A stream object, or
null
if the key was not found.
-
listStreams
DXTickStream[] listStreams()
Description copied from interface:WritableTickDB
Enumerates existing streams.- Specified by:
listStreams
in interfaceTickDB
- Specified by:
listStreams
in interfaceWritableTickDB
- Returns:
- An array of existing stream objects.
-
listChannels
DXChannel[] listChannels()
-
getDbDirs
java.io.File[] getDbDirs()
-
createAnonymousStream
@Deprecated DXTickStream createAnonymousStream(StreamOptions options)
Deprecated.Creates a new anonymous stream.- Parameters:
options
- Options for creating the stream. The stream is automatically created with theStreamScope.RUNTIME
scope.
-
getServerTime
long getServerTime()
Returns system time of the timebase server.
-
createStream
DXTickStream createStream(java.lang.String key, StreamOptions options)
Creates a new stream within the database.- Parameters:
key
- A required key later used to identify the stream.options
- Options for creating the stream.- Throws:
java.lang.IllegalArgumentException
- When the key is duplicate.
-
createFileStream
DXTickStream createFileStream(java.lang.String key, java.lang.String dataFile)
Creates a new stream mount to the given data file.- Parameters:
key
- A required key later used to identify the stream.dataFile
- Path to the data file (on server side).- Returns:
- A new instance of DXTickStream.
-
createStream
DXTickStream createStream(java.lang.String key, java.lang.String name, java.lang.String description, int distributionFactor)
Creates a new stream within the database. The newly created stream must be configured with the required metadata via calling eitherDXTickStream.setFixedType(deltix.qsrv.hf.pub.md.RecordClassDescriptor)
orDXTickStream.setPolymorphic(deltix.qsrv.hf.pub.md.RecordClassDescriptor...)
.- Parameters:
key
- A required key later used to identify the stream.name
- An optional user-readable name.description
- An optional multi-line description.distributionFactor
- The number of files into which to distribute the data. Supply 0 to keep a separate file for each instrument.- Throws:
java.lang.IllegalArgumentException
- When the key is duplicate.
-
setGrowthPolicy
void setGrowthPolicy(deltix.util.lang.GrowthPolicy policy)
Sets the file growth policy- Parameters:
policy
- Growth Policy value
-
getMetaDataVersion
long getMetaDataVersion()
Gets current metadata version.- Returns:
- current metadata version number.
-
getMetaData
MetaData<RecordClassDescriptor> getMetaData()
Gets stream metadata contains all class descriptors.- Returns:
- metadata object.
-
describeQuery
ClassSet describeQuery(java.lang.String qql, SelectionOptions options, Parameter... params) throws deltix.util.parsers.CompilationException
Returns schema for the given query.- Parameters:
qql
- Query text.options
- Selection options.params
- Specified message types to be subscribed. If null, then all types will be subscribed.*- Returns:
- Schema contains classes definitions.
- Throws:
deltix.util.parsers.CompilationException
- when query has errors
-
executeQuery
InstrumentMessageSource executeQuery(java.lang.String qql, SelectionOptions options, deltix.qsrv.hf.pub.InstrumentIdentity[] ids, Parameter... params) throws deltix.util.parsers.CompilationException
Execute Query and creates a message source for reading data from it, 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.
select * from bars
- Parameters:
qql
- Query text.options
- Selection options.ids
- Specified entities to be subscribed. If null, then all entities will be subscribed.params
- The parameter values of the query.- Returns:
- An iterable message source to read messages.
- Throws:
deltix.util.parsers.CompilationException
-
executeQuery
InstrumentMessageSource executeQuery(java.lang.String qql, Parameter... params) throws deltix.util.parsers.CompilationException
Execute Query and creates a message source for reading data from it, 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.
select * from bars
- Parameters:
qql
- Query text.params
- The parameter values of the query.- Returns:
- An iterable message source to read messages.
- Throws:
deltix.util.parsers.CompilationException
-
executeQuery
InstrumentMessageSource executeQuery(java.lang.String qql, SelectionOptions options, Parameter... params) throws deltix.util.parsers.CompilationException
Execute Query and creates a message source for reading data from it, 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.
select * from bars
- Parameters:
qql
- Query text.options
- Selection options.params
- The parameter values of the query.- Returns:
- An iterable message source to read messages.
- Throws:
deltix.util.parsers.CompilationException
- when query has errors
-
executeQuery
InstrumentMessageSource executeQuery(java.lang.String qql, SelectionOptions options, TickStream[] streams, deltix.qsrv.hf.pub.InstrumentIdentity[] ids, long time, Parameter... params) throws deltix.util.parsers.CompilationException
Execute Query and creates a message source for reading data from it, 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.
select * from bars
- Parameters:
qql
- Query text.options
- Selection options.streams
- Streams from which data will be selected.ids
- Specified entities to be subscribed. If null, then all entities will be subscribed.time
- The start timestamp.params
- The parameter values of the query.- Returns:
- An iterable message source to read messages.
- Throws:
deltix.util.parsers.CompilationException
- when query has errors.
-
executeQuery
InstrumentMessageSource executeQuery(java.lang.String qql, SelectionOptions options, TickStream[] streams, deltix.qsrv.hf.pub.InstrumentIdentity[] ids, long startTimestamp, long endTimestamp, Parameter... params) throws deltix.util.parsers.CompilationException
Execute Query and creates a message source for reading data from it, 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.
select * from bars
- Parameters:
qql
- Query text.options
- Selection options.streams
- Streams from which data will be selected.ids
- Specified entities to be subscribed. If null, then all entities will be subscribed.startTimestamp
- The start timestamp.endTimestamp
- The end timestampparams
- The parameter values of the query.- Returns:
- An iterable message source to read messages.
- Throws:
deltix.util.parsers.CompilationException
- when query has errors.
-
executeQuery
InstrumentMessageSource executeQuery(deltix.util.parsers.Element qql, SelectionOptions options, TickStream[] streams, deltix.qsrv.hf.pub.InstrumentIdentity[] ids, long time, Parameter... params) throws deltix.util.parsers.CompilationException
Execute Query and creates a message source for reading data from it, 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.
select * from bars
- Parameters:
qql
- Query text element.options
- Selection options.streams
- Streams from which data will be selected.ids
- Specified entities to be subscribed. If null, then all entities will be subscribed.time
- The start timestamp.params
- The parameter values of the query.- Returns:
- An iterable message source to read messages.
- Throws:
deltix.util.parsers.CompilationException
- when query has errors.
-
executeQuery
InstrumentMessageSource executeQuery(deltix.util.parsers.Element qql, SelectionOptions options, TickStream[] streams, deltix.qsrv.hf.pub.InstrumentIdentity[] ids, long startTimestamp, long endTimestamp, Parameter... params) throws deltix.util.parsers.CompilationException
Execute Query and creates a message source for reading data from it, 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.
select * from bars
- Parameters:
qql
- Query text element.options
- Selection options.streams
- Streams from which data will be selected.ids
- Specified entities to be subscribed. If null, then all entities will be subscribed.startTimestamp
- The start timestamp.endTimestamp
- The end timestampparams
- The parameter values of the query.- Returns:
- An iterable message source to read messages.
- Throws:
deltix.util.parsers.CompilationException
- when query has errors.
-
getTopicDB
TopicDB getTopicDB()
Topic API. May be not be supported by some implementations. UseisTopicDBSupported()
to check this.
-
isTopicDBSupported
boolean isTopicDBSupported()
- Returns:
- true if this DB instance supports topics. If this methods returns false then
getTopicDB()
is unavailable.
-
-