public class OutboundCache
extends java.lang.Object
修飾子とタイプ | クラス | 説明 |
---|---|---|
(package private) static class |
OutboundCache.HashPair |
Key used to cache things with based on source + dest
|
修飾子とタイプ | フィールド | 説明 |
---|---|---|
(package private) java.util.Map<OutboundCache.HashPair,TunnelInfo> |
backloggedTunnelCache |
|
(package private) java.util.Map<OutboundCache.HashPair,java.lang.Long> |
lastReplyRequestCache |
This cache is used to ensure that we request a reply every so often.
|
(package private) java.util.concurrent.ConcurrentHashMap<OutboundCache.HashPair,Lease> |
leaseCache |
Use the same inbound tunnel (i.e.
|
(package private) java.util.Map<OutboundCache.HashPair,LeaseSet> |
leaseSetCache |
Returns the reply lease set if forced to do so,
or if configured to do so,
or if a certain percentage of the time if configured to do so,
or if our lease set has changed since we last talked to them,
or 10% of the time anyway so they don't forget us (disabled for now),
or null otherwise.
|
(package private) java.util.Map<OutboundCache.HashPair,TunnelInfo> |
tunnelCache |
Use the same outbound tunnel as we did for the same destination previously,
if possible, to keep the streaming lib happy
Use two caches - although a cache of a list of tunnels per dest might be
more elegant.
|
コンストラクタ | 説明 |
---|---|
OutboundCache(RouterContext ctx) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
clearAllCaches() |
|
(package private) void |
clearCaches(OutboundCache.HashPair hashPair,
Lease lease,
TunnelInfo inTunnel,
TunnelInfo outTunnel) |
Called on failure to give us a better chance of success next time.
|
final java.util.Map<OutboundCache.HashPair,TunnelInfo> tunnelCache
final java.util.Map<OutboundCache.HashPair,TunnelInfo> backloggedTunnelCache
final java.util.Map<OutboundCache.HashPair,LeaseSet> leaseSetCache
final java.util.concurrent.ConcurrentHashMap<OutboundCache.HashPair,Lease> leaseCache
final java.util.Map<OutboundCache.HashPair,java.lang.Long> lastReplyRequestCache
public OutboundCache(RouterContext ctx)
void clearCaches(OutboundCache.HashPair hashPair, Lease lease, TunnelInfo inTunnel, TunnelInfo outTunnel)
lease
- may be nullinTunnel
- may be nulloutTunnel
- may be nullpublic void clearAllCaches()