Class CommitterImpl
- java.lang.Object
-
- com.google.api.core.AbstractApiService
-
- com.google.cloud.pubsublite.internal.ProxyService
-
- com.google.cloud.pubsublite.internal.wire.CommitterImpl
-
- All Implemented Interfaces:
com.google.api.core.ApiService,Committer,RetryingConnectionObserver<SequencedCommitCursorResponse>
public class CommitterImpl extends ProxyService implements Committer, RetryingConnectionObserver<SequencedCommitCursorResponse>
-
-
Constructor Summary
Constructors Constructor Description CommitterImpl(StreamFactory<StreamingCommitCursorRequest,StreamingCommitCursorResponse> streamFactory, InitialCommitCursorRequest request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.core.ApiFuture<Void>commitOffset(Offset offset)protected voidhandlePermanentError(CheckedApiException error)voidonClientResponse(SequencedCommitCursorResponse value)protected voidstop()voidtriggerReinitialize(CheckedApiException streamError)voidwaitUntilEmpty()-
Methods inherited from class com.google.cloud.pubsublite.internal.ProxyService
addServices, addServices, doStart, doStop, onPermanentError, start
-
Methods inherited from class com.google.api.core.AbstractApiService
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync
-
-
-
-
Constructor Detail
-
CommitterImpl
public CommitterImpl(StreamFactory<StreamingCommitCursorRequest,StreamingCommitCursorResponse> streamFactory, InitialCommitCursorRequest request) throws com.google.api.gax.rpc.ApiException
- Throws:
com.google.api.gax.rpc.ApiException
-
-
Method Detail
-
handlePermanentError
protected void handlePermanentError(CheckedApiException error)
- Overrides:
handlePermanentErrorin classProxyService
-
stop
protected void stop()
- Overrides:
stopin classProxyService
-
triggerReinitialize
public void triggerReinitialize(CheckedApiException streamError)
- Specified by:
triggerReinitializein interfaceRetryingConnectionObserver<SequencedCommitCursorResponse>
-
onClientResponse
public void onClientResponse(SequencedCommitCursorResponse value) throws CheckedApiException
- Specified by:
onClientResponsein interfaceRetryingConnectionObserver<SequencedCommitCursorResponse>- Throws:
CheckedApiException
-
commitOffset
public com.google.api.core.ApiFuture<Void> commitOffset(Offset offset)
- Specified by:
commitOffsetin interfaceCommitter
-
waitUntilEmpty
public void waitUntilEmpty() throws CheckedApiException- Specified by:
waitUntilEmptyin interfaceCommitter- Throws:
CheckedApiException
-
-