public class NodeARKInserter extends java.lang.Object implements ClientPutCallback, RequestClient
Modifier and Type | Method and Description |
---|---|
RequestClient |
getRequestClient()
Get the RequestClient context object used to indicate which requests are related to each
other for scheduling purposes.
|
void |
onConnectedPeer() |
void |
onFailure(InsertException e,
BaseClientPutter state)
Called on failed/canceled insert.
|
void |
onFetchable(BaseClientPutter state)
Called when the inserted data is fetchable (just a hint, don't rely on this).
|
void |
onGeneratedMetadata(Bucket metadata,
BaseClientPutter state)
Called when we are returning metadata rather than a URI.
|
void |
onGeneratedURI(FreenetURI uri,
BaseClientPutter state)
Called when URI is known (e.g.
|
void |
onResume(ClientContext context)
Called for a persistent request when the node is restarted.
|
void |
onSuccess(BaseClientPutter state)
Called on successful insert.
|
boolean |
persistent()
Is this request persistent? **Must not change!**
|
boolean |
realTimeFlag()
Send the request with the real time flag enabled? Real-time requests are given
a higher priority in data transfers, but fewer of them are accepted.
|
void |
update() |
public void update()
public void onSuccess(BaseClientPutter state)
ClientPutCallback
onSuccess
in interface ClientPutCallback
state
- The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert() (to obtain the Bucket).public void onFailure(InsertException e, BaseClientPutter state)
ClientPutCallback
onFailure
in interface ClientPutCallback
state
- The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert() (to obtain the Bucket).public void onGeneratedURI(FreenetURI uri, BaseClientPutter state)
ClientPutCallback
onGeneratedURI
in interface ClientPutCallback
state
- The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert().public void onConnectedPeer()
public void onFetchable(BaseClientPutter state)
ClientPutCallback
onFetchable
in interface ClientPutCallback
state
- The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert().public boolean persistent()
RequestClient
persistent
in interface RequestClient
public boolean realTimeFlag()
RequestClient
realTimeFlag
in interface RequestClient
public void onGeneratedMetadata(Bucket metadata, BaseClientPutter state)
ClientPutCallback
onGeneratedMetadata
in interface ClientPutCallback
metadata
- Bucket containing the metadata. Persistent if the insert
is persistent. Recipient may keep it, but must eventually free it. The
caller will not free it.state
- The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert().public void onResume(ClientContext context)
ClientBaseCallback
onResume
in interface ClientBaseCallback
public RequestClient getRequestClient()
ClientBaseCallback
getRequestClient
in interface ClientBaseCallback