java.lang.Object
net.i2p.router.tunnel.pool.TunnelPeerSelector.EndpointCacheEntry
- Enclosing class:
TunnelPeerSelector
One cached gateway or endpoint decision.
Field Summary
Constructor Summary
ConstructorsConstructorDescriptionEndpointCacheEntry(boolean allowed, long expiresAt) Caches one endpoint decision.Method Summary
All MethodsModifier and TypeMethodDescription(package private) booleanisExpired(long now) Whether the cached decision has gone stale.
Field Details
allowed
final boolean allowedWhether the peer was allowed as an endpoint.expiresAt
final long expiresAtWhen the cached decision goes stale.
Constructor Details
EndpointCacheEntry
EndpointCacheEntry(boolean allowed, long expiresAt) Caches one endpoint decision.- Parameters:
allowed- whether the peer was allowedexpiresAt- when the decision goes stale
Method Details
isExpired
boolean isExpired(long now) Whether the cached decision has gone stale.- Parameters:
now- the current time- Returns:
- true if the entry may be dropped