public class SimpleSingleFileFetcher extends BaseSingleFileFetcher implements ClientGetState, java.io.Serializable
cancelled, cooldownWakeupTime, ctx, deleteFetchContext, finished, key
parent
parentGrabArray, persistent, realTimeFlag
Modifier and Type | Method and Description |
---|---|
void |
cancel(ClientContext context)
Cancel the request, and call onFailure() on the callback in order to tell
downstream (ultimately the client) that cancel has succeeded, and to allow
it to call removeFrom() to avoid a database leak.
|
protected Bucket |
extract(ClientKeyBlock block,
ClientContext context)
Convert a ClientKeyBlock to a Bucket.
|
protected ClientGetState |
getClientGetState() |
long |
getToken()
getToken() is not supported
|
protected void |
notFoundInStore(ClientContext context) |
protected void |
onBlockDecodeError(SendableRequestItem token,
ClientContext context) |
protected void |
onFailure(FetchException e,
boolean forceFatal,
ClientContext context) |
void |
onFailure(LowLevelGetException e,
SendableRequestItem reqTokenIgnored,
ClientContext context)
Called when/if the low-level request fails.
|
void |
onShutdown(ClientContext context)
Called just before the final write of client.dat before the node shuts down.
|
void |
onSuccess(ClientKeyBlock block,
boolean fromStore,
java.lang.Object reqTokenIgnored,
ClientContext context)
Called when/if the low-level request succeeds.
|
protected void |
onSuccess(FetchResult data,
ClientContext context)
Will be overridden by SingleFileFetcher
|
chooseKey, countAllKeys, countSendableKeys, getClient, getClientRequest, getContext, getCooldownWakeup, getKey, getPriorityClass, getRequest, getWakeupTime, isCancelled, isEmpty, isSSK, listKeys, makeKeyListener, onChangedFetchContext, onEnterFiniteCooldown, onGotKey, onResume, onSuccess, preRegister, reschedule, retry, schedule, unregister, unregisterAll
clearWakeupTime, getNodeKey, getScheduler, getSender, internalError, isInsert, reduceWakeupTime, translateException
getParentGrabArray, getSchedulerGroup, hashCode, knowsParentGrabArray, objectToString, persistent, realTimeFlag, setParentGrabArray
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
onResume, schedule
public void onFailure(LowLevelGetException e, SendableRequestItem reqTokenIgnored, ClientContext context)
SendableGet
onFailure
in class SendableGet
protected void onFailure(FetchException e, boolean forceFatal, ClientContext context)
protected void onSuccess(FetchResult data, ClientContext context)
public void onSuccess(ClientKeyBlock block, boolean fromStore, java.lang.Object reqTokenIgnored, ClientContext context)
BaseSingleFileFetcher
onSuccess
in class BaseSingleFileFetcher
protected Bucket extract(ClientKeyBlock block, ClientContext context)
public long getToken()
getToken
in interface ClientGetState
public void cancel(ClientContext context)
ClientGetState
cancel
in interface ClientGetState
cancel
in class BaseSingleFileFetcher
protected void notFoundInStore(ClientContext context)
notFoundInStore
in class BaseSingleFileFetcher
protected void onBlockDecodeError(SendableRequestItem token, ClientContext context)
onBlockDecodeError
in class BaseSingleFileFetcher
public void onShutdown(ClientContext context)
ClientGetState
onShutdown
in interface ClientGetState
protected ClientGetState getClientGetState()
getClientGetState
in class SendableGet