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 voidabortBackgroundProcess()Aborts active background process if any existsvoiddelete()Deletes this streamvoiddeleteSpaces(java.lang.String... names)Removed given 'spaces' permanentlyjava.lang.Stringdescribe()Returns stream DDL description.booleanenableVersioning()voidexecute(TransformationTask task)Executes stream background transformation task.BackgroundProcessInfogetBackgroundProcess()Gets stream background process information.deltix.qsrv.hf.pub.InstrumentIdentity[]getComposition(deltix.qsrv.hf.pub.InstrumentIdentity... entities)longgetDataVersion()Get latest stream operation version.DXTickDBgetDB()Returns parent database.intgetDistributionFactor()Returns the target number of files to be used for storing data.booleangetHighAvailability()java.lang.StringgetKey()Returns unique identifier of the stream.java.lang.StringgetOwner()Returns stream owner.deltix.util.time.PeriodicitygetPeriodicity()Gets stream periodicity.longgetReplicaVersion()StreamScopegetScope()Returns the durability scope.StreamOptionsgetStreamOptions()Gets stream options.DBLocklock()Non-blocking operation that acquires a WRITE lock of this stream (or fails immediately).DBLocklock(LockType type)Non-blocking operation that lock of this stream (or fails immediately).voidpurge(long time)Deletes stream data that is older than a specified timevoidpurge(long time, java.lang.String space)Deletes stream data in specific space that is older than a specified timevoidrename(java.lang.String key)Sets new key for the streamvoidrenameInstruments(deltix.qsrv.hf.pub.InstrumentIdentity[] from, deltix.qsrv.hf.pub.InstrumentIdentity[] to)voidrenameSpace(java.lang.String newName, java.lang.String oldName)Renames spacedefault deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage>selectMulticast(boolean raw)voidsetDescription(java.lang.String description)Sets a user-readable multi-line description.voidsetFixedType(RecordClassDescriptor cd)Marks this stream as fixed-type (monomorphic), capable of containing messages of a single specified type.voidsetHighAvailability(boolean value)Enables/Disable stream data caching into memory.voidsetName(java.lang.String name)Sets a user-readable short name.voidsetOwner(java.lang.String owner)Sets a stream owner.voidsetPeriodicity(deltix.util.time.Periodicity periodicity)Sets stream periodicity.voidsetPolymorphic(RecordClassDescriptor... cds)Marks this stream as multi-type (Polymorphic), capable of containing messages of the several types.voidsetReplicaVersion(long version)voidsetTargetNumFiles(int value)Sets the target number of files to be used for storing data.DBLocktryLock(long timeout)Blocking operation that attempts to obtain WRITE lock on this stream.DBLocktryLock(LockType type, long timeout)Blocking operation that attempts to obtain given type of lock on this stream.DBLockverify(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:
getDBin interfaceTickStream- Specified by:
getDBin interfaceWritableTickStream- Returns:
- Parent database object.
-
getKey
java.lang.String getKey()
Returns unique identifier of the stream.- Specified by:
getKeyin interfacedeltix.util.security.AuthorizationController.NamedProtectedResource- Specified by:
getKeyin interfaceDXChannel<deltix.qsrv.hf.pub.InstrumentMessage>- Specified by:
getKeyin 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:
getOwnerin 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)
-
-