public class GhostPeerManager extends Object
| Constructor and Description |
|---|
GhostPeerManager(RouterContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Cleanup old entries to prevent memory growth.
|
void |
clearGhost(Hash peer)
Clear ghost status for a peer (manual intervention).
|
int |
getGhostCount()
Get count of currently tracked ghost peers.
|
int |
getThreshold()
Get the current timeout threshold.
|
int |
getTimeoutCount(Hash peer)
Get consecutive timeout count for a peer.
|
boolean |
isGhost(Hash peer)
Check if a peer should be excluded from tunnel selection.
|
boolean |
isInCooldown(Hash peer)
Check if a peer is in ghost cooldown period.
|
void |
recordSuccess(Hash peer)
Record successful tunnel participation by a peer.
|
void |
recordTimeout(Hash peer)
Record that a peer timed out during tunnel build.
|
public GhostPeerManager(RouterContext context)
public void cleanup()
public void clearGhost(Hash peer)
peer - the peer hash to clearpublic int getGhostCount()
public int getThreshold()
public int getTimeoutCount(Hash peer)
peer - the peer hashpublic boolean isGhost(Hash peer)
peer - the peer hash to checkpublic boolean isInCooldown(Hash peer)
peer - the peer hash to checkpublic void recordSuccess(Hash peer)
peer - the peer hash that participated successfullypublic void recordTimeout(Hash peer)
peer - the peer hash that timed out