public interface PayloadTable extends Closeable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
PayloadTable.Entry
Represents an entry (row) in the payload table.
|
| Modifier and Type | Method and Description |
|---|---|
co.cask.cdap.api.dataset.lib.CloseableIterator<PayloadTable.Entry> |
fetch(TopicMetadata metadata,
long transactionWritePointer,
MessageId messageId,
boolean inclusive,
int limit)
Fetches entries from the payload table under the given topic, starting from the given
MessageId. |
void |
store(Iterator<? extends PayloadTable.Entry> entries)
Stores a list of entries to the payload table under the given topic.
|
co.cask.cdap.api.dataset.lib.CloseableIterator<PayloadTable.Entry> fetch(TopicMetadata metadata, long transactionWritePointer, MessageId messageId, boolean inclusive, int limit) throws IOException
MessageId.metadata - TopicMetadata of the topic to fetch fromtransactionWritePointer - transaction write pointermessageId - message Id to start frominclusive - true to include the entry identified by the given MessageId as the first messagelimit - maximum number of entries to fetchCloseableIterator of entriesIOExceptionvoid store(Iterator<? extends PayloadTable.Entry> entries) throws IOException
entries - a list of entries to store. This method guarantees each PayloadTable.Entry will be consumed right away,
hence it is safe for the Iterator to reuse the same PayloadTable.Entry instanceIOExceptionCopyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.