public interface KeyListener
Modifier and Type | Method and Description |
---|---|
long |
countKeys() |
short |
definitelyWantKey(Key key,
byte[] saltedKey,
ClientContext context)
Do we want the key? This is called by the ULPR code, because fetching the
key will involve significant work.
|
HasKeyListener |
getHasKeyListener() |
short |
getPriorityClass()
Priority of the associated request.
|
SendableGet[] |
getRequestsForKey(Key key,
byte[] saltedKey,
ClientContext context)
Find the requests related to a specific key, used in retrying after cooldown.
|
boolean |
handleBlock(Key key,
byte[] saltedKey,
KeyBlock found,
ClientContext context)
Handle the found data, if we really want it.
|
boolean |
isEmpty()
Has the request finished? If every key has been found, or enough keys have
been found, return true so that the caller can remove it from the list.
|
boolean |
isSSK() |
void |
onRemove()
Deactivate the request once it has been removed.
|
boolean |
persistent()
Is this related to a persistent request?
|
boolean |
probablyWantKey(Key key,
byte[] saltedKey)
Fast guess at whether we want a key or not.
|
boolean probablyWantKey(Key key, byte[] saltedKey)
short definitelyWantKey(Key key, byte[] saltedKey, ClientContext context)
SendableGet[] getRequestsForKey(Key key, byte[] saltedKey, ClientContext context)
boolean handleBlock(Key key, byte[] saltedKey, KeyBlock found, ClientContext context)
boolean persistent()
short getPriorityClass()
long countKeys()
HasKeyListener getHasKeyListener()
void onRemove()
boolean isEmpty()
boolean isSSK()