Class PublisherImpl (1.4.12)

public final class PublisherImpl extends ProxyService implements Publisher<Offset>, RetryingConnectionObserver<Offset>

Inheritance

java.lang.Object > AbstractApiService > ProxyService > PublisherImpl

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)
Parameters
NameDescription
streamFactoryStreamFactories.PublishStreamFactory
initialRequestInitialPublishRequest
batchingSettingsBatchingSettings

Methods

cancelOutstandingPublishes()

public void cancelOutstandingPublishes()

flush()

public void flush()

handlePermanentError(CheckedApiException error)

protected void handlePermanentError(CheckedApiException error)
Parameter
NameDescription
errorCheckedApiException
Overrides

onClientResponse(Offset value)

public void onClientResponse(Offset value)
Parameter
NameDescription
valueOffset
Exceptions
TypeDescription
CheckedApiException

publish(Message message)

public ApiFuture<Offset> publish(Message message)
Parameter
NameDescription
messageMessage
Returns
TypeDescription
ApiFuture<Offset>

start()

protected void start()
Overrides

stop()

protected void stop()
Overrides

triggerReinitialize(CheckedApiException streamError)

public void triggerReinitialize(CheckedApiException streamError)
Parameter
NameDescription
streamErrorCheckedApiException