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()
ClientPutState
getParent
in interface ClientPutState
public void cancel(ClientContext context)
ClientPutState
cancel
in interface ClientPutState
public void schedule(ClientContext context) throws InsertException
ClientPutState
schedule
in interface ClientPutState
InsertException
public java.lang.Object getToken()
ClientPutState
getToken
in interface ClientPutState
public void onResume(ClientContext context) throws InsertException, ResumeFailedException
ClientPutState
onResume
in interface ClientPutState
InsertException
ResumeFailedException
public void onFinishedEncode()
SplitFileInserterStorageCallback
onFinishedEncode
in interface SplitFileInserterStorageCallback
public void encodingProgress()
SplitFileInserterStorageCallback
encodingProgress
in interface SplitFileInserterStorageCallback
public void onHasKeys()
SplitFileInserterStorageCallback
onHasKeys
in interface SplitFileInserterStorageCallback
public void onSucceeded(Metadata metadata)
SplitFileInserterStorageCallback
onSucceeded
in interface SplitFileInserterStorageCallback
protected void unregisterSender()
protected void reportMetadata(Metadata metadata)
public void onFailed(InsertException e)
SplitFileInserterStorageCallback
onFailed
in interface SplitFileInserterStorageCallback
public long getLength()
public void onInsertedBlock()
SplitFileInserterStorageCallback
onInsertedBlock
in interface SplitFileInserterStorageCallback
public void onShutdown(ClientContext context)
ClientPutState
onShutdown
in interface ClientPutState
public void clearCooldown()
SplitFileInserterStorageCallback
clearCooldown
in interface SplitFileInserterStorageCallback
public short getPriorityClass()
SplitFileInserterStorageCallback
getPriorityClass
in interface SplitFileInserterStorageCallback