public static class PeerNode.SlotWaiter
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
addWaitingFor(PeerNode peer)
Add another node to wait for.
|
freenet.node.PeerNode.RequestLikelyAcceptedState |
getAcceptedState() |
java.lang.String |
toString() |
PeerNode |
waitForAny(long maxWait,
boolean timeOutIsFatal)
Wait for any of the PeerNode's we have queued on to accept (locally
i.e.
|
int |
waitingForCount() |
java.util.HashSet<PeerNode> |
waitingForList() |
public boolean addWaitingFor(PeerNode peer)
public java.util.HashSet<PeerNode> waitingForList()
public PeerNode waitForAny(long maxWait, boolean timeOutIsFatal) throws freenet.node.PeerNode.SlotWaiterFailedException
maxWait
- The time to wait for. Can be 0, but if it is 0, this
is a "peek", i.e. if we return null, the queued slots remain live.
Whereas if maxWait is not 0, we will unregister when we timeout.timeOutIsFatal
- If true, if we timeout, count it for each node
involved as a fatal timeout.SlotWaiterFailedException
- If a peer actually failed.freenet.node.PeerNode.SlotWaiterFailedException
public freenet.node.PeerNode.RequestLikelyAcceptedState getAcceptedState()
public java.lang.String toString()
toString
in class java.lang.Object
public int waitingForCount()