public class SimpleSendableInsert extends SendableInsert
| Modifier and Type | Field and Description |
|---|---|
KeyBlock |
block |
RequestClient |
client |
short |
prioClass |
ClientRequestScheduler |
scheduler |
parentGrabArray, persistent, realTimeFlag| Constructor and Description |
|---|
SimpleSendableInsert(KeyBlock block,
short prioClass,
RequestClient client,
ClientRequestScheduler scheduler) |
SimpleSendableInsert(NodeClientCore core,
KeyBlock block,
short prioClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(ClientContext context) |
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.
|
ClientRequestSchedulerGroup |
getSchedulerGroup() |
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() |
getScheduler, internalError, isInsert, onResumeclearWakeupTime, getParentGrabArray, hashCode, knowsParentGrabArray, objectToString, persistent, realTimeFlag, reduceWakeupTime, setParentGrabArray, unregisterpublic final KeyBlock block
public final short prioClass
public final RequestClient client
public final ClientRequestScheduler scheduler
public SimpleSendableInsert(NodeClientCore core, KeyBlock block, short prioClass)
public SimpleSendableInsert(KeyBlock block, short prioClass, RequestClient client, ClientRequestScheduler scheduler)
public void onSuccess(SendableRequestItem keyNum, ClientKey key, ClientContext context)
SendableInsertonSuccess in class SendableInsertpublic void onFailure(LowLevelPutException e, SendableRequestItem keyNum, ClientContext context)
SendableInsertonFailure in class SendableInsertpublic short getPriorityClass()
SendableRequestgetPriorityClass in class SendableRequestpublic SendableRequestSender getSender(ClientContext context)
SendableRequestgetSender in class SendableRequestcontext - A client context may also be necessary.public RequestClient getClient()
SendableRequestgetClient in class SendableRequestpublic ClientRequester getClientRequest()
SendableRequestgetClientRequest in class SendableRequestpublic ClientRequestSchedulerGroup getSchedulerGroup()
getSchedulerGroup in class SendableRequestpublic boolean isCancelled()
SendableRequestisCancelled in class SendableRequestpublic boolean isEmpty()
isEmpty in class SendableInsertpublic void schedule()
public void cancel(ClientContext context)
public long countAllKeys(ClientContext context)
SendableRequestcountAllKeys in class SendableRequestpublic long countSendableKeys(ClientContext context)
SendableRequestcountSendableKeys in class SendableRequestpublic SendableRequestItem chooseKey(KeysFetchingLocally keys, ClientContext context)
SendableRequestchooseKey in class SendableRequestpublic long getWakeupTime(ClientContext context, long now)
RequestSelectionTreeNodegetWakeupTime in interface RequestSelectionTreeNodegetWakeupTime in interface RandomGrabArrayItemgetWakeupTime in class SendableInsertpublic boolean isSSK()
SendableRequestisSSK in class SendableRequestpublic boolean canWriteClientCache()
canWriteClientCache in class SendableInsertpublic boolean forkOnCacheable()
forkOnCacheable in class SendableInsertpublic void onEncode(SendableRequestItem token, ClientKey key, ClientContext context)
SendableInsertonEncode in class SendableInsertpublic boolean localRequestOnly()
localRequestOnly in class SendableInsertprotected void innerOnResume(ClientContext context) throws InsertException
innerOnResume in class SendableInsertInsertException