Package com.c8db
Interface C8Stream
-
- All Superinterfaces:
C8SerializationAccessor
- All Known Implementing Classes:
C8StreamImpl
public interface C8Stream extends C8SerializationAccessor
Interface for operations on ArangoDB graph level.- See Also:
- API Documentation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description C8Databasedb()The the handler of the database the named graph is withinvoiddeleteSubscription(String subscriptionName, boolean isLocal)Delete a subscription.voidexpireMessagesInSeconds(String subscriptionName, int expireTimeInSeconds, boolean isLocal)Expire messages on a stream subscription.C8StreamBacklogEntitygetBacklog(boolean isLocal)Get estimated backlog for offline stream.C8StreamStatisticsEntitygetStatistics(boolean isLocal)Get the statistics for the given stream.Collection<String>getSubscriptions(boolean isLocal)Get the list of persistent subscriptions for a given stream.Stringname()The name of the collectionvoidresetCursor(String subscriptionName, boolean isLocal)Disconnect all active consumers for a cursor and reset the cursor.voidresetCursorToTimestamp(String subscriptionName, int timestamp, boolean isLocal)Reset subscription to message position closest to absolute timestamp (in miliseconds).voidskipAllMessages(String subscriptionName, boolean isLocal)Skip all messages on a stream subscription.voidskipMessages(String subscriptionName, int numberOfMessages, boolean isLocal)Skip num messages on a topic subscription.voidterminate(boolean isLocal)Terminate a stream.-
Methods inherited from interface com.c8db.C8SerializationAccessor
util, util
-
-
-
-
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.
-
-