@InterfaceAudience.Private public class NoopPartialResultCoprocessorCallback<S,R> extends Object implements AsyncTable.PartialResultCoprocessorCallback<S,R>
Constructor and Description |
---|
NoopPartialResultCoprocessorCallback(AsyncTable.CoprocessorCallback<R> delegate) |
Modifier and Type | Method and Description |
---|---|
ServiceCaller<S,R> |
getNextCallable(R response,
RegionInfo region)
Subclasses should implement this to tell AsyncTable whether the given response is "final" or
whether the AsyncTable should send another request to the coprocessor to fetch more results
from the given region.
|
Duration |
getWaitInterval(R response,
RegionInfo region)
Subclasses should implement this such that, when the above method returns non-null, this
method returns the duration that AsyncTable should wait before sending the next request to
the given region.
|
void |
onComplete()
Indicate that all responses of the regions have been notified by calling
AsyncTable.CoprocessorCallback.onRegionComplete(RegionInfo, Object) or
AsyncTable.CoprocessorCallback.onRegionError(RegionInfo, Throwable) . |
void |
onError(Throwable error)
Indicate that we got an error which does not belong to any regions.
|
void |
onRegionComplete(RegionInfo region,
R resp)
Indicate that the respose of a region is available
|
void |
onRegionError(RegionInfo region,
Throwable error)
Indicate that the error for a region is available
|
public NoopPartialResultCoprocessorCallback(AsyncTable.CoprocessorCallback<R> delegate)
public void onRegionComplete(RegionInfo region, R resp)
AsyncTable.CoprocessorCallback
onRegionComplete
in interface AsyncTable.CoprocessorCallback<R>
region
- the region that the response belongs toresp
- the response of the coprocessor callpublic void onRegionError(RegionInfo region, Throwable error)
AsyncTable.CoprocessorCallback
onRegionError
in interface AsyncTable.CoprocessorCallback<R>
region
- the region that the error belongs toerror
- the response error of the coprocessor callpublic void onComplete()
AsyncTable.CoprocessorCallback
AsyncTable.CoprocessorCallback.onRegionComplete(RegionInfo, Object)
or
AsyncTable.CoprocessorCallback.onRegionError(RegionInfo, Throwable)
.onComplete
in interface AsyncTable.CoprocessorCallback<R>
public void onError(Throwable error)
AsyncTable.CoprocessorCallback
onError
in interface AsyncTable.CoprocessorCallback<R>
public ServiceCaller<S,R> getNextCallable(R response, RegionInfo region)
AsyncTable.PartialResultCoprocessorCallback
getNextCallable
in interface AsyncTable.PartialResultCoprocessorCallback<S,R>
response
- The response received from the coprocessorregion
- The region the response came frompublic Duration getWaitInterval(R response, RegionInfo region)
AsyncTable.PartialResultCoprocessorCallback
Duration.ZERO
.getWaitInterval
in interface AsyncTable.PartialResultCoprocessorCallback<S,R>
response
- The response received from the coprocessorregion
- The region the response came fromCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.