public interface MessageTable extends Closeable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
MessageTable.Entry
Represents an entry (row) in the message table.
|
| Modifier and Type | Method and Description |
|---|---|
co.cask.cdap.api.dataset.lib.CloseableIterator<MessageTable.Entry> |
fetch(TopicMetadata metadata,
long startTime,
int limit,
org.apache.tephra.Transaction transaction)
Fetches message table entries in the given topic that were publish on or after the given start time.
|
co.cask.cdap.api.dataset.lib.CloseableIterator<MessageTable.Entry> |
fetch(TopicMetadata metadata,
MessageId messageId,
boolean inclusive,
int limit,
org.apache.tephra.Transaction transaction)
Fetches message table entries in the given topic, starting from the given
MessageId. |
void |
rollback(TopicMetadata metadata,
RollbackDetail rollbackDetail)
Rollback entries stored earlier, as deleted, under the given topic based on the given information.
|
void |
store(Iterator<? extends MessageTable.Entry> entries)
Stores a list of entries to the message table under the given topic.
|
co.cask.cdap.api.dataset.lib.CloseableIterator<MessageTable.Entry> fetch(TopicMetadata metadata, long startTime, int limit, @Nullable org.apache.tephra.Transaction transaction) throws IOException
metadata - metadata of the topic to fetch fromstartTime - the publish time to start fromlimit - maximum number of messages to fetchtransaction - an optional Transaction to use for fetchingCloseableIterator of MessageTable.Entry.IOExceptionco.cask.cdap.api.dataset.lib.CloseableIterator<MessageTable.Entry> fetch(TopicMetadata metadata, MessageId messageId, boolean inclusive, int limit, @Nullable org.apache.tephra.Transaction transaction) throws IOException
MessageId.metadata - TopicMetadata of the the topic to fetch frommessageId - the message id to start fetching frominclusive - indicate whether to include the given MessageId as the first message (if still available)
or not.limit - maximum number of messages to fetchtransaction - an optional Transaction to use for fetchingCloseableIterator of MessageTable.Entry.IOExceptionvoid store(Iterator<? extends MessageTable.Entry> entries) throws IOException
entries - a list of entries to store. This method guarantees each MessageTable.Entry will be consumed right away,
hence it is safe for the Iterator to reuse the same MessageTable.Entry instance.IOExceptionvoid rollback(TopicMetadata metadata, RollbackDetail rollbackDetail) throws IOException
metadata - TopicMetadata of the topic to rollback fromrollbackDetail - RollbackDetail information required to rollback entriesIOExceptionCopyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.