public class SplitFileInserterSender extends SendableInsert
parentGrabArray, persistent, realTimeFlag
Constructor and Description |
---|
SplitFileInserterSender(SplitFileInserter parent,
SplitFileInserterStorage storage) |
Modifier and Type | Method and Description |
---|---|
boolean |
canWriteClientCache() |
SendableRequestItem |
chooseKey(KeysFetchingLocally keys,
ClientContext context)
Choose a key to fetch.
|
long |
countAllKeys(ClientContext context)
All key identifiers.
|
long |
countSendableKeys(ClientContext context)
All key identifiers currently eligible to be sent.
|
boolean |
forkOnCacheable() |
RequestClient |
getClient()
Get client context object.
|
ClientRequester |
getClientRequest()
Get the ClientRequest.
|
short |
getPriorityClass()
Get the priority class of the request.
|
SendableRequestSender |
getSender(ClientContext context)
Get or create a SendableRequestSender for this object.
|
long |
getWakeupTime(ClientContext context,
long now)
Unless this is a RandomGrabArrayItem, this will return the wakeup time for the subtree
rooted at this node.
|
protected void |
innerOnResume(ClientContext context) |
boolean |
isCancelled()
If true, the request has been cancelled, or has completed, either way it need not
be registered any more.
|
boolean |
isEmpty() |
boolean |
isSSK()
Is this an SSK? For purposes of determining which scheduler to use.
|
boolean |
localRequestOnly() |
void |
onEncode(SendableRequestItem token,
ClientKey key,
ClientContext context)
Encoded a key
|
void |
onFailure(LowLevelPutException e,
SendableRequestItem keyNum,
ClientContext context)
Called when we don't!
|
void |
onSuccess(SendableRequestItem keyNum,
ClientKey key,
ClientContext context)
Called when we successfully insert the data
|
void |
schedule(ClientContext context) |
getScheduler, internalError, isInsert, onResume
clearWakeupTime, getParentGrabArray, getSchedulerGroup, hashCode, knowsParentGrabArray, objectToString, persistent, realTimeFlag, reduceWakeupTime, setParentGrabArray, unregister
public SplitFileInserterSender(SplitFileInserter parent, SplitFileInserterStorage storage)
public void onSuccess(SendableRequestItem keyNum, ClientKey key, ClientContext context)
SendableInsert
onSuccess
in class SendableInsert
public void onFailure(LowLevelPutException e, SendableRequestItem keyNum, ClientContext context)
SendableInsert
onFailure
in class SendableInsert
public boolean canWriteClientCache()
canWriteClientCache
in class SendableInsert
public boolean localRequestOnly()
localRequestOnly
in class SendableInsert
public boolean forkOnCacheable()
forkOnCacheable
in class SendableInsert
public void onEncode(SendableRequestItem token, ClientKey key, ClientContext context)
SendableInsert
onEncode
in class SendableInsert
public boolean isEmpty()
isEmpty
in class SendableInsert
protected void innerOnResume(ClientContext context) throws InsertException, ResumeFailedException
innerOnResume
in class SendableInsert
InsertException
ResumeFailedException
public short getPriorityClass()
SendableRequest
getPriorityClass
in class SendableRequest
public SendableRequestItem chooseKey(KeysFetchingLocally keys, ClientContext context)
SendableRequest
chooseKey
in class SendableRequest
public long countAllKeys(ClientContext context)
SendableRequest
countAllKeys
in class SendableRequest
public long countSendableKeys(ClientContext context)
SendableRequest
countSendableKeys
in class SendableRequest
public SendableRequestSender getSender(ClientContext context)
SendableRequest
getSender
in class SendableRequest
context
- A client context may also be necessary.public boolean isCancelled()
SendableRequest
isCancelled
in class SendableRequest
public RequestClient getClient()
SendableRequest
getClient
in class SendableRequest
public ClientRequester getClientRequest()
SendableRequest
getClientRequest
in class SendableRequest
public boolean isSSK()
SendableRequest
isSSK
in class SendableRequest
public void schedule(ClientContext context)
public long getWakeupTime(ClientContext context, long now)
RequestSelectionTreeNode
getWakeupTime
in interface RequestSelectionTreeNode
getWakeupTime
in interface RandomGrabArrayItem
getWakeupTime
in class SendableInsert