Package deltix.qsrv.hf.tickdb.pub
Interface DXTickStream
-
- All Superinterfaces:
deltix.util.security.AuthorizationController.NamedProtectedResource
,deltix.util.security.AuthorizationController.OwnedProtectedResource
,deltix.util.security.AuthorizationController.ProtectedResource
,DXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
,TickStream
,WritableTickStream
public interface DXTickStream extends WritableTickStream, deltix.util.security.AuthorizationController.OwnedProtectedResource, deltix.util.security.AuthorizationController.NamedProtectedResource
Methods specific to the Deltix implementation of WritableTickStream.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
abortBackgroundProcess()
Aborts active background process if any existsvoid
delete()
Deletes this streamvoid
deleteSpaces(java.lang.String... names)
Removed given 'spaces' permanentlyjava.lang.String
describe()
Returns stream DDL description.boolean
enableVersioning()
void
execute(TransformationTask task)
Executes stream background transformation task.BackgroundProcessInfo
getBackgroundProcess()
Gets stream background process information.deltix.qsrv.hf.pub.InstrumentIdentity[]
getComposition(deltix.qsrv.hf.pub.InstrumentIdentity... entities)
long
getDataVersion()
Get latest stream operation version.DXTickDB
getDB()
Returns parent database.int
getDistributionFactor()
Returns the target number of files to be used for storing data.boolean
getHighAvailability()
java.lang.String
getKey()
Returns unique identifier of the stream.java.lang.String
getOwner()
Returns stream owner.deltix.util.time.Periodicity
getPeriodicity()
Gets stream periodicity.long
getReplicaVersion()
StreamScope
getScope()
Returns the durability scope.StreamOptions
getStreamOptions()
Gets stream options.DBLock
lock()
Non-blocking operation that acquires a WRITE lock of this stream (or fails immediately).DBLock
lock(LockType type)
Non-blocking operation that lock of this stream (or fails immediately).void
purge(long time)
Deletes stream data that is older than a specified timevoid
purge(long time, java.lang.String space)
Deletes stream data in specific space that is older than a specified timevoid
rename(java.lang.String key)
Sets new key for the streamvoid
renameInstruments(deltix.qsrv.hf.pub.InstrumentIdentity[] from, deltix.qsrv.hf.pub.InstrumentIdentity[] to)
void
renameSpace(java.lang.String newName, java.lang.String oldName)
Renames spacedefault deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
selectMulticast(boolean raw)
void
setDescription(java.lang.String description)
Sets a user-readable multi-line description.void
setFixedType(RecordClassDescriptor cd)
Marks this stream as fixed-type (monomorphic), capable of containing messages of a single specified type.void
setHighAvailability(boolean value)
Enables/Disable stream data caching into memory.void
setName(java.lang.String name)
Sets a user-readable short name.void
setOwner(java.lang.String owner)
Sets a stream owner.void
setPeriodicity(deltix.util.time.Periodicity periodicity)
Sets stream periodicity.void
setPolymorphic(RecordClassDescriptor... cds)
Marks this stream as multi-type (Polymorphic), capable of containing messages of the several types.void
setReplicaVersion(long version)
void
setTargetNumFiles(int value)
Sets the target number of files to be used for storing data.DBLock
tryLock(long timeout)
Blocking operation that attempts to obtain WRITE lock on this stream.DBLock
tryLock(LockType type, long timeout)
Blocking operation that attempts to obtain given type of lock on this stream.DBLock
verify(DBLock lock, LockType type)
Blocking operation that attempts to verify that given lock is applied t the stream.-
Methods inherited from interface deltix.data.stream.DXChannel
createConsumer, createPublisher, getTypes
-
Methods inherited from interface deltix.qsrv.hf.tickdb.pub.TickStream
createCursor, getAllDescriptors, getDescription, getFixedType, getFormatVersion, getName, getPolymorphicDescriptors, getTimeRange, getTimeRange, getTypeVersion, isFixedType, isPolymorphic, listEntities, listEntities, listSpaces, listTimeRange, select, select, select, select
-
Methods inherited from interface deltix.qsrv.hf.tickdb.pub.WritableTickStream
clear, createLoader, createLoader, delete, truncate
-
-
-
-
Method Detail
-
getDB
DXTickDB getDB()
Returns parent database.- Specified by:
getDB
in interfaceTickStream
- Specified by:
getDB
in interfaceWritableTickStream
- Returns:
- Parent database object.
-
getKey
java.lang.String getKey()
Returns unique identifier of the stream.- Specified by:
getKey
in interfacedeltix.util.security.AuthorizationController.NamedProtectedResource
- Specified by:
getKey
in interfaceDXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
- Specified by:
getKey
in interfaceTickStream
-
getDistributionFactor
int getDistributionFactor()
Returns the target number of files to be used for storing data.
-
setTargetNumFiles
void setTargetNumFiles(int value)
Sets the target number of files to be used for storing data.
-
setName
void setName(java.lang.String name)
Sets a user-readable short name.
-
setDescription
void setDescription(java.lang.String description)
Sets a user-readable multi-line description.
-
setOwner
void setOwner(java.lang.String owner)
Sets a stream owner.
-
getOwner
java.lang.String getOwner()
Returns stream owner.- Specified by:
getOwner
in interfacedeltix.util.security.AuthorizationController.OwnedProtectedResource
-
getScope
StreamScope getScope()
Returns the durability scope.
-
setPolymorphic
void setPolymorphic(RecordClassDescriptor... cds)
Marks this stream as multi-type (Polymorphic), capable of containing messages of the several types.- Parameters:
cds
- The descriptors of the classes describing messages to be contained in the stream.
-
setFixedType
void setFixedType(RecordClassDescriptor cd)
Marks this stream as fixed-type (monomorphic), capable of containing messages of a single specified type.- Parameters:
cd
- The descriptor of the class describing messages to be contained in the stream.
-
delete
void delete()
Deletes this stream
-
rename
void rename(java.lang.String key)
Sets new key for the stream- Parameters:
key
- New key of the stream
-
purge
void purge(long time)
Deletes stream data that is older than a specified time- Parameters:
time
- Purge time in milliseconds
-
purge
void purge(long time, java.lang.String space)
Deletes stream data in specific space that is older than a specified time- Parameters:
time
- Purge time in millisecondsspace
- Space to be purged
-
execute
void execute(TransformationTask task)
Executes stream background transformation task.- Parameters:
task
- Task to execute in background.
-
getBackgroundProcess
BackgroundProcessInfo getBackgroundProcess()
Gets stream background process information.- Returns:
- the active BackgroundProcessInfo or null, if no active process running.
-
abortBackgroundProcess
void abortBackgroundProcess()
Aborts active background process if any exists
-
getPeriodicity
deltix.util.time.Periodicity getPeriodicity()
Gets stream periodicity.- Returns:
- stream periodicity
-
setPeriodicity
void setPeriodicity(deltix.util.time.Periodicity periodicity)
Sets stream periodicity.By default, stream has
Periodicity.Type.IRREGULAR
.- Parameters:
periodicity
- Periodicity value. If null, stream will have IRREGULAR periodicity.
-
setHighAvailability
void setHighAvailability(boolean value)
Enables/Disable stream data caching into memory.- Parameters:
value
- Iftrue
, stream data will be loaded into memory.
-
getHighAvailability
boolean getHighAvailability()
-
getStreamOptions
StreamOptions getStreamOptions()
Gets stream options.- Returns:
- stream options.
-
describe
java.lang.String describe()
Returns stream DDL description.- Returns:
- DDL.
-
deleteSpaces
void deleteSpaces(java.lang.String... names)
Removed given 'spaces' permanently- Parameters:
names
- list of spaces names to delete
-
renameSpace
void renameSpace(java.lang.String newName, java.lang.String oldName)
Renames space- Parameters:
newName
- new nameoldName
- space to rename
-
lock
DBLock lock() throws StreamLockedException, java.lang.UnsupportedOperationException
Non-blocking operation that acquires a WRITE lock of this stream (or fails immediately).- Returns:
- A not-null DBLock object representing the newly-acquired lock
- Throws:
StreamLockedException
- if this stream is already locked by another clientjava.lang.UnsupportedOperationException
- if this stream is not supporting locks
-
lock
DBLock lock(LockType type) throws StreamLockedException, java.lang.UnsupportedOperationException
Non-blocking operation that lock of this stream (or fails immediately).- Parameters:
type
- Type of lock (WRITE or READ)- Returns:
- A not-null DBLock object representing the newly-acquired lock
- Throws:
StreamLockedException
- if this stream is already locked by another clientjava.lang.UnsupportedOperationException
- if this stream is not supporting locks
-
tryLock
DBLock tryLock(long timeout) throws StreamLockedException, java.lang.UnsupportedOperationException
Blocking operation that attempts to obtain WRITE lock on this stream. If lock cannot be obtained during specified timeout operation fails with StreamLockedException.- Parameters:
timeout
- timeout to wait in milliseconds- Returns:
- A not-null DBLock object representing the newly-acquired lock
- Throws:
StreamLockedException
- if this stream is already locked by another clientjava.lang.UnsupportedOperationException
- if this stream is not supporting locks
-
tryLock
DBLock tryLock(LockType type, long timeout) throws StreamLockedException, java.lang.UnsupportedOperationException
Blocking operation that attempts to obtain given type of lock on this stream. If lock cannot be obtained during specified timeout operation fails with StreamLockedException.- Parameters:
type
- Type of lock (WRITE or READ)timeout
- timeout to wait in milliseconds- Returns:
- A not-null DBLock object representing the newly-acquired lock
- Throws:
StreamLockedException
- if this stream is already locked by another clientjava.lang.UnsupportedOperationException
- if this stream is not supporting locks
-
verify
DBLock verify(DBLock lock, LockType type) throws StreamLockedException, java.lang.UnsupportedOperationException
Blocking operation that attempts to verify that given lock is applied t the stream.- Parameters:
type
- Type of lock (WRITE or READ)- Returns:
- A DBLock object representing the applied lock, or null if lock is not exists
- Throws:
StreamLockedException
- if this stream is already locked by another clientjava.lang.UnsupportedOperationException
- if this stream is not supporting locks
-
enableVersioning
boolean enableVersioning()
-
getDataVersion
long getDataVersion()
Get latest stream operation version.- Returns:
- last index of stream operation, or -1 if version tracking is not enabled
-
getReplicaVersion
long getReplicaVersion()
-
setReplicaVersion
void setReplicaVersion(long version)
-
getComposition
deltix.qsrv.hf.pub.InstrumentIdentity[] getComposition(deltix.qsrv.hf.pub.InstrumentIdentity... entities)
-
renameInstruments
void renameInstruments(deltix.qsrv.hf.pub.InstrumentIdentity[] from, deltix.qsrv.hf.pub.InstrumentIdentity[] to)
-
selectMulticast
default deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage> selectMulticast(boolean raw)
-
-