public class FailureTable
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
FailureTable.FailureTableCleaner |
Modifier and Type | Field and Description |
---|---|
freenet.node.FailureTable.OfferedKeysByteCounter |
senderCounter |
Modifier and Type | Method and Description |
---|---|
freenet.node.FailureTable.OfferList |
getOffers(Key key) |
TimedOutNodesList |
getTimedOutNodesList(Key key) |
boolean |
hadAnyOffers(Key key)
Have we had any offers for the key?
|
protected void |
innerOnOffer(Key key,
PeerNode peer,
byte[] authenticator)
This method runs on the SerialExecutor.
|
protected void |
innerSendOfferedKey(Key key,
boolean isSSK,
boolean needPubKey,
long uid,
PeerNode source,
OfferReplyTag tag,
boolean realTimeFlag)
This method runs on the SerialExecutor.
|
short |
minOfferedHTL(Key key,
short htl) |
void |
onDisconnect(PeerNode pn)
Called when a node disconnects
|
void |
onFailed(Key key,
PeerNode routedTo,
short htl,
long rfTimeout,
long ftTimeout)
Called when we route to a node and it fails for some reason, but we continue the request.
|
void |
onFinalFailure(Key key,
PeerNode routedTo,
short htl,
short origHTL,
long rfTimeout,
long ftTimeout,
PeerNode requestor)
When a request finishes with a failure, record who generated the failure
so we don't route to them next time, and also who originated it so we can
send the data back to them if we find them.
|
void |
onFound(KeyBlock block)
Called when a data block is found (after it has been stored; there is a good chance of its being available in the
near future).
|
boolean |
peersWantKey(Key key,
PeerNode apartFrom) |
void |
sendOfferedKey(Key key,
boolean isSSK,
boolean needPubKey,
long uid,
PeerNode source,
OfferReplyTag tag,
boolean realTimeFlag)
We offered a key, a node has responded to the offer.
|
void |
start() |
public final freenet.node.FailureTable.OfferedKeysByteCounter senderCounter
public void start()
public void onFailed(Key key, PeerNode routedTo, short htl, long rfTimeout, long ftTimeout)
key
- routedTo
- htl
- rfTimeout
- ftTimeout
- public void onFinalFailure(Key key, PeerNode routedTo, short htl, short origHTL, long rfTimeout, long ftTimeout, PeerNode requestor)
public void onFound(KeyBlock block)
protected void innerOnOffer(Key key, PeerNode peer, byte[] authenticator)
public void sendOfferedKey(Key key, boolean isSSK, boolean needPubKey, long uid, PeerNode source, OfferReplyTag tag, boolean realTimeFlag) throws NotConnectedException
key
- The key to send.isSSK
- Whether it is an SSK.uid
- The UID.source
- The node that asked for the key.NotConnectedException
- If the sender ceases to be connected.protected void innerSendOfferedKey(Key key, boolean isSSK, boolean needPubKey, long uid, PeerNode source, OfferReplyTag tag, boolean realTimeFlag) throws NotConnectedException
NotConnectedException
public boolean hadAnyOffers(Key key)
key
- The key to check.public freenet.node.FailureTable.OfferList getOffers(Key key)
public void onDisconnect(PeerNode pn)
public TimedOutNodesList getTimedOutNodesList(Key key)
public short minOfferedHTL(Key key, short htl)