public final class PublisherImpl extends ProxyService implements Publisher<Offset>, RetryingConnectionObserver<Offset>
Implements
com.google.cloud.pubsublite.internal.Publisher<com.google.cloud.pubsublite.Offset>, com.google.cloud.pubsublite.internal.wire.RetryingConnectionObserver<com.google.cloud.pubsublite.Offset>Constructors
PublisherImpl(StreamFactories.PublishStreamFactory streamFactory, InitialPublishRequest initialRequest, BatchingSettings batchingSettings)
public PublisherImpl(StreamFactories.PublishStreamFactory streamFactory, InitialPublishRequest initialRequest, BatchingSettings batchingSettings)
Name | Description |
streamFactory | StreamFactories.PublishStreamFactory |
initialRequest | InitialPublishRequest |
batchingSettings | BatchingSettings |
Methods
cancelOutstandingPublishes()
public void cancelOutstandingPublishes()
flush()
public void flush()
handlePermanentError(CheckedApiException error)
protected void handlePermanentError(CheckedApiException error)
Name | Description |
error | CheckedApiException |
onClientResponse(Offset value)
public void onClientResponse(Offset value)
Name | Description |
value | Offset |
Type | Description |
CheckedApiException |
publish(Message message)
public ApiFuture<Offset> publish(Message message)
Name | Description |
message | Message |
Type | Description |
ApiFuture<Offset> |
start()
protected void start()
stop()
protected void stop()
triggerReinitialize(CheckedApiException streamError)
public void triggerReinitialize(CheckedApiException streamError)
Name | Description |
streamError | CheckedApiException |