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 Detail

      • getKey

        java.lang.String getKey()
        Returns unique identifier of the stream.
        Specified by:
        getKey in interface deltix.util.security.AuthorizationController.NamedProtectedResource
        Specified by:
        getKey in interface DXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
        Specified by:
        getKey in interface TickStream
      • 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 interface deltix.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 milliseconds
        space - 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 - If true, 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 name
        oldName - 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 client
        java.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 client
        java.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 client
        java.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 client
        java.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 client
        java.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)