public class SplitFileInserter extends java.lang.Object implements ClientPutState, java.io.Serializable, SplitFileInserterStorageCallback
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(ClientContext context)
Cancel the request.
|
void |
clearCooldown()
Called when a block becomes fetchable (unless because of an encode, in which case we only
call encodingProgress() )
|
void |
encodingProgress()
Called after finishing encoding the check blocks and block keys for another segment.
|
long |
getLength() |
BaseClientPutter |
getParent()
Get the BaseClientPutter responsible for this request state.
|
short |
getPriorityClass()
Get request priority class for FEC jobs etc
|
java.lang.Object |
getToken()
Get the token, an object which is passed around with the insert and may be
used by callers.
|
void |
onFailed(InsertException e)
Called if the insert fails.
|
void |
onFinishedEncode()
All the segments (and possibly cross-segments) have been encoded.
|
void |
onHasKeys()
Called when all segments have been encoded.
|
void |
onInsertedBlock()
Called when a block is inserted successfully
|
void |
onResume(ClientContext context)
Called on restarting the node for a persistent request.
|
void |
onShutdown(ClientContext context)
Called just before the final write of client.dat before the node shuts down.
|
void |
onSucceeded(Metadata metadata)
Called when the whole insert has succeeded, i.e.
|
protected void |
reportMetadata(Metadata metadata) |
void |
schedule(ClientContext context)
Schedule the request.
|
protected void |
unregisterSender() |
public BaseClientPutter getParent()
ClientPutStategetParent in interface ClientPutStatepublic void cancel(ClientContext context)
ClientPutStatecancel in interface ClientPutStatepublic void schedule(ClientContext context) throws InsertException
ClientPutStateschedule in interface ClientPutStateInsertExceptionpublic java.lang.Object getToken()
ClientPutStategetToken in interface ClientPutStatepublic void onResume(ClientContext context) throws InsertException, ResumeFailedException
ClientPutStateonResume in interface ClientPutStateInsertExceptionResumeFailedExceptionpublic void onFinishedEncode()
SplitFileInserterStorageCallbackonFinishedEncode in interface SplitFileInserterStorageCallbackpublic void encodingProgress()
SplitFileInserterStorageCallbackencodingProgress in interface SplitFileInserterStorageCallbackpublic void onHasKeys()
SplitFileInserterStorageCallbackonHasKeys in interface SplitFileInserterStorageCallbackpublic void onSucceeded(Metadata metadata)
SplitFileInserterStorageCallbackonSucceeded in interface SplitFileInserterStorageCallbackprotected void unregisterSender()
protected void reportMetadata(Metadata metadata)
public void onFailed(InsertException e)
SplitFileInserterStorageCallbackonFailed in interface SplitFileInserterStorageCallbackpublic long getLength()
public void onInsertedBlock()
SplitFileInserterStorageCallbackonInsertedBlock in interface SplitFileInserterStorageCallbackpublic void onShutdown(ClientContext context)
ClientPutStateonShutdown in interface ClientPutStatepublic void clearCooldown()
SplitFileInserterStorageCallbackclearCooldown in interface SplitFileInserterStorageCallbackpublic short getPriorityClass()
SplitFileInserterStorageCallbackgetPriorityClass in interface SplitFileInserterStorageCallback