public class SimpleHealingQueue extends BaseClientPutter implements HealingQueue, PutCompletionCallback
blockSetFinalized, cancelled, client, creationTime, failedBlocks, fatallyFailedBlocks, latestFailure, latestSuccess, minSuccessBlocks, priorityClass, realTimeFlag, sentToNetwork, successfulBlocks, totalBlocks| Constructor and Description |
|---|
SimpleHealingQueue(InsertContext context,
short prio,
int maxRunning) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(ClientContext context)
Cancel the request.
|
protected ClientBaseCallback |
getCallback() |
int |
getMinSuccessFetchBlocks() |
FreenetURI |
getURI()
Get the URI for the request or insert.
|
protected void |
innerNotifyClients(ClientContext context)
Notify clients, usually via a SplitfileProgressEvent, of the current progress.
|
void |
innerOnResume(ClientContext context)
Called by onResume() once and only once after restarting.
|
boolean |
innerQueue(Bucket data,
byte[] cryptoKey,
byte cryptoAlgorithm,
ClientContext context) |
protected void |
innerToNetwork(ClientContext context)
Notify clients that a request has gone to the network, for the first time, i.e.
|
boolean |
isFinished()
Is the request or insert completed (succeeded, failed, or
cancelled, which is a kind of failure)?
|
void |
onBlockSetFinished(ClientPutState state,
ClientContext context)
Called when the ClientPutState knows that it knows about
all the blocks it will need to put.
|
void |
onEncode(BaseClientKey usk,
ClientPutState state,
ClientContext context)
Called when we know the final URI of the state in question.
|
void |
onFailure(InsertException e,
ClientPutState state,
ClientContext context) |
void |
onFetchable(ClientPutState state)
Called when enough data has been inserted that the file can be
retrieved, even if not all data has been inserted yet.
|
void |
onMetadata(Bucket meta,
ClientPutState state,
ClientContext context)
Called as an alternative to onEncode, if a metadata length threshold
was specified.
|
void |
onMetadata(Metadata m,
ClientPutState state,
ClientContext context)
Only called if explicitly asked for, in which case, generally
the metadata won't be inserted.
|
void |
onSuccess(ClientPutState state,
ClientContext context) |
void |
onTransition(ClientGetState oldState,
ClientGetState newState,
ClientContext context) |
void |
onTransition(ClientPutState oldState,
ClientPutState newState,
ClientContext context) |
void |
queue(Bucket data,
byte[] cryptoKey,
byte cryptoAlgorithm,
ClientContext context)
Queue a Bucket of data to insert as a CHK.
|
dumpaddBlock, addBlocks, addMustSucceedBlocks, addRedundantBlocksInsert, blockSetFinalized, cancel, clearCountersOnRestart, completedBlock, failedBlock, failedBlock, fatallyFailedBlock, getAll, getClient, getClientDetail, getClientDetail, getLatestFailure, getLatestSuccess, getPriorityClass, getSchedulerGroup, getTotalBlocks, hashCode, isCancelled, isCurrentState, notifyClients, onResume, onShutdown, persistent, realTimeFlag, resetBlocks, setPriorityClass, toNetworkclone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, waitonResumepublic SimpleHealingQueue(InsertContext context, short prio, int maxRunning)
public boolean innerQueue(Bucket data, byte[] cryptoKey, byte cryptoAlgorithm, ClientContext context)
public void queue(Bucket data, byte[] cryptoKey, byte cryptoAlgorithm, ClientContext context)
HealingQueuequeue in interface HealingQueuepublic FreenetURI getURI()
ClientRequestergetURI in class ClientRequesterpublic boolean isFinished()
ClientRequesterisFinished in class ClientRequesterprotected void innerNotifyClients(ClientContext context)
ClientRequesterinnerNotifyClients in class ClientRequesterpublic void onSuccess(ClientPutState state, ClientContext context)
onSuccess in interface PutCompletionCallbackpublic void onFailure(InsertException e, ClientPutState state, ClientContext context)
onFailure in interface PutCompletionCallbackpublic void onEncode(BaseClientKey usk, ClientPutState state, ClientContext context)
PutCompletionCallbackonEncode in interface PutCompletionCallbackpublic void onTransition(ClientPutState oldState, ClientPutState newState, ClientContext context)
onTransition in interface PutCompletionCallbackonTransition in class BaseClientPutterpublic void onMetadata(Metadata m, ClientPutState state, ClientContext context)
PutCompletionCallbackonMetadata in interface PutCompletionCallbackpublic void onBlockSetFinished(ClientPutState state, ClientContext context)
PutCompletionCallbackonBlockSetFinished in interface PutCompletionCallbackpublic void onFetchable(ClientPutState state)
PutCompletionCallbackonFetchable in interface PutCompletionCallbackpublic void onTransition(ClientGetState oldState, ClientGetState newState, ClientContext context)
onTransition in class ClientRequesterprotected void innerToNetwork(ClientContext context)
ClientRequesterinnerToNetwork in class ClientRequesterpublic void cancel(ClientContext context)
ClientRequestercancel in class ClientRequestercontext - The ClientContext object including essential but
non-persistent objects such as the schedulers.public int getMinSuccessFetchBlocks()
getMinSuccessFetchBlocks in class BaseClientPutterpublic void onMetadata(Bucket meta, ClientPutState state, ClientContext context)
PutCompletionCallbackonMetadata in interface PutCompletionCallbackpublic void innerOnResume(ClientContext context)
ClientRequesterinnerOnResume in class ClientRequesterprotected ClientBaseCallback getCallback()
getCallback in class ClientRequester