Package com.c8db

Interface C8Stream

    • Method Detail

      • db

        C8Database db()
        The the handler of the database the named graph is within
        Returns:
        database handler
      • name

        String name()
        The name of the collection
        Returns:
        collection name
      • getBacklog

        C8StreamBacklogEntity getBacklog​(boolean isLocal)
        Get estimated backlog for offline stream.
        Returns:
      • getStatistics

        C8StreamStatisticsEntity getStatistics​(boolean isLocal)
        Get the statistics for the given stream.
        Parameters:
        isLocal - Operate on a local stream instead of a global one. Default value: false
        Returns:
      • terminate

        void terminate​(boolean isLocal)
        Terminate a stream. A stream that is terminated will not accept any more messages to be published and will let consumer to drain existing messages in backlog.
        Parameters:
        isLocal - Operate on a local stream instead of a global one. Default value: false
      • getSubscriptions

        Collection<String> getSubscriptions​(boolean isLocal)
        Get the list of persistent subscriptions for a given stream.
        Parameters:
        isLocal - Operate on a local stream instead of a global one. Default value: false
        Returns:
      • skipMessages

        void skipMessages​(String subscriptionName,
                          int numberOfMessages,
                          boolean isLocal)
        Skip num messages on a topic subscription.
        Parameters:
        subscriptionName - Identification name of the subscription.
        numberOfMessages - Number of messages to skip.
        isLocal - Operate on a local stream instead of a global one.
      • skipAllMessages

        void skipAllMessages​(String subscriptionName,
                             boolean isLocal)
        Skip all messages on a stream subscription.
        Parameters:
        subscriptionName - Identification name of the subscription.
        isLocal - Operate on a local stream instead of a global one.
      • resetCursorToTimestamp

        void resetCursorToTimestamp​(String subscriptionName,
                                    int timestamp,
                                    boolean isLocal)
        Reset subscription to message position closest to absolute timestamp (in miliseconds).
        Parameters:
        subscriptionName - Identification name of the subscription.
        timestamp - Timestamp in miliseconds.
        isLocal - Operate on a local stream instead of a global one.
      • resetCursor

        void resetCursor​(String subscriptionName,
                         boolean isLocal)
        Disconnect all active consumers for a cursor and reset the cursor.
        Parameters:
        subscriptionName - Identification name of the subscription.
        isLocal - Operate on a local stream instead of a global one.
      • expireMessagesInSeconds

        void expireMessagesInSeconds​(String subscriptionName,
                                     int expireTimeInSeconds,
                                     boolean isLocal)
        Expire messages on a stream subscription.
        Parameters:
        subscriptionName - Identification name of the subscription.
        expireTimeInSeconds - Expiration time in seconds.
        isLocal - Operate on a local stream instead of a global one.
      • deleteSubscription

        void deleteSubscription​(String subscriptionName,
                                boolean isLocal)
        Delete a subscription.
        Parameters:
        subscriptionName - Identification name of the subscription.
        isLocal - Operate on a local stream instead of a global one.