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 void
handlePermanentError(CheckedApiException error)
void
onClientResponse(SequencedCommitCursorResponse value)
protected void
stop()
void
triggerReinitialize(CheckedApiException streamError)
void
waitUntilEmpty()
-
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:
handlePermanentError
in classProxyService
-
stop
protected void stop()
- Overrides:
stop
in classProxyService
-
triggerReinitialize
public void triggerReinitialize(CheckedApiException streamError)
- Specified by:
triggerReinitialize
in interfaceRetryingConnectionObserver<SequencedCommitCursorResponse>
-
onClientResponse
public void onClientResponse(SequencedCommitCursorResponse value) throws CheckedApiException
- Specified by:
onClientResponse
in interfaceRetryingConnectionObserver<SequencedCommitCursorResponse>
- Throws:
CheckedApiException
-
commitOffset
public com.google.api.core.ApiFuture<Void> commitOffset(Offset offset)
- Specified by:
commitOffset
in interfaceCommitter
-
waitUntilEmpty
public void waitUntilEmpty() throws CheckedApiException
- Specified by:
waitUntilEmpty
in interfaceCommitter
- Throws:
CheckedApiException
-
-