public final class StoreRequestBuilder extends Object
StoreRequest instances. This is mainly used on the client side.| Modifier and Type | Method and Description |
|---|---|
StoreRequestBuilder |
addPayloads(byte[]... payloads)
Adds a list of byte arrays as the payloads of the request.
|
StoreRequestBuilder |
addPayloads(Iterator<byte[]> payloads)
Adds a list of byte arrays as the payloads of the request.
|
StoreRequestBuilder |
addPayloads(String... payloads)
Adds a list of Strings as the payloads of the request.
|
StoreRequest |
build()
Creates a
StoreRequest based on the settings in this builder. |
boolean |
hasPayload()
Returns
true if there is some payload in this builder. |
static StoreRequestBuilder |
of(co.cask.cdap.proto.id.TopicId topicId)
Creates a new
StoreRequestBuilder instance. |
StoreRequestBuilder |
setTransaction(Long txWritePointer)
Sets the transaction write pointer to be used for the request.
|
public static StoreRequestBuilder of(co.cask.cdap.proto.id.TopicId topicId)
StoreRequestBuilder instance.topicId - the topic that the store action will happen.public StoreRequestBuilder addPayloads(byte[]... payloads)
public StoreRequestBuilder addPayloads(String... payloads)
public StoreRequestBuilder addPayloads(Iterator<byte[]> payloads)
public StoreRequestBuilder setTransaction(@Nullable Long txWritePointer)
txWritePointer - the transaction write pointer if want to publish transactionally, or null
for non-transactional publish.public boolean hasPayload()
true if there is some payload in this builder.public StoreRequest build()
StoreRequest based on the settings in this builder.Copyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.