java.lang.Object
net.i2p.router.tunnel.pool.TunnelPeerSelector.EndpointCacheEntry
Enclosing class:
TunnelPeerSelector

private static final class TunnelPeerSelector.EndpointCacheEntryextends Object
One cached gateway or endpoint decision.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final boolean
    Whether the peer was allowed as an endpoint.
    (package private) final long
    When the cached decision goes stale.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EndpointCacheEntry(boolean allowed, long expiresAt)
    Caches one endpoint decision.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    (package private) boolean
    isExpired(long now)
    Whether the cached decision has gone stale.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • allowed

      final boolean allowed
      Whether the peer was allowed as an endpoint.
    • expiresAt

      final long expiresAt
      When the cached decision goes stale.
  • Constructor Details

    • EndpointCacheEntry

      EndpointCacheEntry(boolean allowed, long expiresAt)
      Caches one endpoint decision.
      Parameters:
      allowed - whether the peer was allowed
      expiresAt - 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