Packages that use PeerProfile
Package
Description
The Kademlia distributed hash table (DHT) network database: lookup, store and explore jobs, the data store, the floodfill variants, and lookup throttling.
Peer profiles and capacity calculation, peer test jobs, peer selection for tunnel building, and the database and tunnel history used for peer selection.
Tunnel pool management: pool lifecycle, peer selection, build scheduling and failure handling for client and exploratory tunnels.
  • Uses of PeerProfile in net.i2p.router.networkdb.kademlia

    Methods in net.i2p.router.networkdb.kademlia with parameters of type PeerProfile
    Modifier and Type
    Method
    Description
    (package private) static boolean
    KademliaNetworkDatabaseFacade.hasDirectContact(PeerProfile prof)
    Direct-contact test on profile evidence only: heard-from or successful-send, never heard-about (that only means someone mentioned them).
  • Uses of PeerProfile in net.i2p.router.peermanager

    Classes in net.i2p.router.peermanager that implement interfaces with type arguments of type PeerProfile
    Modifier and Type
    Class
    Description
    (package private) class 
    Order profiles by their capacity, but backwards (highest capacity / value first).
    (package private) class 
    Order profiles by their speed (lowest first).
    Modifier and Type
    Method
    Description
    ProfileOrganizer.addProfile(PeerProfile profile)
    Insert a fully-constructed profile into the organizer.
    ProfileOrganizer.getOrCreateProfileNonblocking(Hash peer)
    Retrieve an existing profile or create a new one, without blocking on contention.
    ProfileOrganizer.getProfile(Hash peer)
    Retrieve the profile for a peer, or null if unknown.
    ProfileOrganizer.getProfileNonblocking(Hash peer)
    Retrieve the profile for a peer without blocking.
    (package private) static PeerProfile
    ProfileOrganizer.profileToPromote(PeerProfile live, PeerProfile fallback)
    Which profile a promotion pass should act on: the live one when the map has it, the caller's otherwise.
    ProfilePersistenceHelper.readProfile(File file, long cutoff)
    Read and parse a single stored profile.
    (package private) static PeerProfile
    ProfileOrganizer.selectNthFastest(Collection<PeerProfile> profiles, long now, double capacityThreshold, int k)
    Select the k-th fastest qualifying profile (1-based) without sorting the whole candidate set.
    (package private) static PeerProfile
    ProfileOrganizer.selectSpeedBoundary(Collection<PeerProfile> profiles, long now, double capacityThreshold)
    The profile whose speed becomes the speed threshold: the one at rank ProfileOrganizer.speedThresholdCutoff(int) of the qualifying set, ranked fastest first.
    Methods in net.i2p.router.peermanager that return types with arguments of type PeerProfile
    Modifier and Type
    Method
    Description
    ProfilePersistenceHelper.readProfiles()
    Load all existing profiles from the profile directory.
    Methods in net.i2p.router.peermanager with parameters of type PeerProfile
    Modifier and Type
    Method
    Description
    (package private) static boolean
    ProfileOrganizer.aboveRttCeiling(PeerProfile profile, long rttCeilingMs)
    True if the peer's measured tunnel-test RTT exceeds the adaptive selection ceiling, indicating it should be excluded from this fast-tier pick while still remaining in the tier (soft signal.
    ProfileOrganizer.addProfile(PeerProfile profile)
    Insert a fully-constructed profile into the organizer.
    static double
    CapacityCalculator.calc(PeerProfile profile)
    Calculate the capacity for the given peer profile.
    static double
    IntegrationCalculator.calc(PeerProfile profile)
    How well integrated the peer is, as a weighted count of recent db introductions plus the integration bonus.
    static double
    SpeedCalculator.calc(PeerProfile profile)
    Calculate the estimated speed score for the given peer.
    int
    InverseCapacityComparator.compare(PeerProfile left, PeerProfile right)
    Compare the two objects backwards.
    int
    SpeedComparator.compare(PeerProfile left, PeerProfile right)
     
    (package private) static double
    ProfileOrganizer.getExcessiveFailurePenalty(Hash peer, PeerProfile prof)
    Selection penalty multiplier for peers between the soft and hard failure thresholds.
    (package private) static boolean
    ProfileOrganizer.hasRecentProofOfLife(PeerProfile profile, long now)
    True if the peer has shown proof of life within ProfileOrganizer.PROOF_OF_LIFE_WINDOW_MS: a successful send, heard-from, or heard-about within the last hour.
    (package private) static boolean
    ProfileOrganizer.hasRecentTierActivity(PeerProfile profile, long activeCutoff)
    True if the peer showed recent activity within the given cutoff: a heard-from or successful send at or after the cutoff.
    (package private) static boolean
    ProfileOrganizer.isActiveInWindow(PeerProfile profile, long hideBefore)
    Whether a profile shows activity within the active window: a peer test counted as active, a successful or failed send, or any contact.
    (package private) static boolean
    ProfileOrganizer.isEvictable(PeerProfile profile, Map<Hash, PeerProfile> fastPeers, Map<Hash, PeerProfile> highCapPeers, long activeThreshold, int fastPeerLimit, int highCapacityLimit)
    Whether a profile is eligible for eviction under the profile cap: not protected by a fast/high-cap tier slot that still has room below its limit, and no send or heard-from activity within the active window.
    (package private) static boolean
    ProfileOrganizer.isExcessiveLifetimeFailure(PeerProfile prof)
    Whether the given profile carries excessive cumulative tunnel failures.
    (package private) static boolean
    ProfileOrganizer.isExpiredProfile(PeerProfile profile, long now, long expireActive, long expirePassive, long expireGossip, long expireUntracked)
    Whether a profile has expired from its activity tier and should be purged: no activity (send/heard/heard-about) within the tier's expiration window.
    (package private) static boolean
    ProfileOrganizer.isReliableBandwidthPeer(PeerProfile profile, long now, boolean established)
    Reliability gate for high-bandwidth (O/P/X tier) selection: the peer must show a tunnel acceptance ratio of at least 0.3 AND evidence of recent activity.
    (package private) static boolean
    ProfileOrganizer.isStaleAbsentPeer(PeerProfile profile, long now, long absentThreshold)
    Whether the peer's last activity (send, heard-from, or heard-about) is older than the absent threshold.
    (package private) static boolean
    ProfileOrganizer.needsRouterInfoRefresh(RouterInfo info, PeerProfile profile, long now, long refreshAgeMs)
    Whether a RouterInfo is old enough that promoting on it risks a build failure: published before the threshold and no proof of life.
    (package private) boolean
    ProfileOrganizer.passesTierGates(PeerProfile profile, double buildSuccess, long now)
    Common gate for the fast-tier fill passes, which always require acceptable tunnel acceptance.
    (package private) boolean
    ProfileOrganizer.passesTierGates(PeerProfile profile, double buildSuccess, long now, boolean requireAcceptance)
    Common gate for fast/high-cap tier fill passes: the peer must be selectable, have acceptable tunnel acceptance, no recent tunnel failures, and not be in loss probation.
    (package private) static PeerProfile
    ProfileOrganizer.profileToPromote(PeerProfile live, PeerProfile fallback)
    Which profile a promotion pass should act on: the live one when the map has it, the caller's otherwise.
    (package private) String
    ProfileOrganizer.promotionSkipReason(PeerProfile profile, Hash peer, double buildSuccess, long now)
    Why ProfileOrganizer.skipsPromotion(PeerProfile, Hash, double) would skip this profile, or null when it would not.
    (package private) boolean
    ProfileOrganizer.skipsPromotion(PeerProfile profile, Hash peer, double buildSuccess)
    Whether the peer should be skipped for tier promotion: not selectable, in a strict country, low tunnel acceptance, high-latency penalty, congested, or in loss probation.
    (package private) void
    ProfileManagerImpl.updateFloodfillReliability(PeerProfile data)
    Compute floodfill reliability from DBHistory.
    void
    ProfileOrganizer.writeProfile(PeerProfile profile)
    Persist the given profile to disk.
    boolean
    ProfilePersistenceHelper.writeProfile(PeerProfile profile)
    Write the data from the profile to the file.
    void
    ProfilePersistenceHelper.writeProfile(PeerProfile profile, OutputStream out)
    Write the data from the profile to the stream includes comments.
    void
    ProfilePersistenceHelper.writeProfile(PeerProfile profile, OutputStream out, boolean addComments)
    Write the data from the profile to the stream.
    Method parameters in net.i2p.router.peermanager with type arguments of type PeerProfile
    Modifier and Type
    Method
    Description
    (package private) static int
    ProfileOrganizer.countQualifying(Collection<PeerProfile> profiles, long now, double capacityThreshold)
    How many of the given profiles qualify for the speed-threshold ranking.
    (package private) static boolean
    ProfileOrganizer.isEvictable(PeerProfile profile, Map<Hash, PeerProfile> fastPeers, Map<Hash, PeerProfile> highCapPeers, long activeThreshold, int fastPeerLimit, int highCapacityLimit)
    Whether a profile is eligible for eviction under the profile cap: not protected by a fast/high-cap tier slot that still has room below its limit, and no send or heard-from activity within the active window.
    (package private) static PeerProfile
    ProfileOrganizer.selectNthFastest(Collection<PeerProfile> profiles, long now, double capacityThreshold, int k)
    Select the k-th fastest qualifying profile (1-based) without sorting the whole candidate set.
    (package private) static PeerProfile
    ProfileOrganizer.selectSpeedBoundary(Collection<PeerProfile> profiles, long now, double capacityThreshold)
    The profile whose speed becomes the speed threshold: the one at rank ProfileOrganizer.speedThresholdCutoff(int) of the qualifying set, ranked fastest first.
  • Uses of PeerProfile in net.i2p.router.tunnel.pool

    Methods in net.i2p.router.tunnel.pool with parameters of type PeerProfile
    Modifier and Type
    Method
    Description
    (package private) static int
    ClientPeerSelector.compareAcceptance(PeerProfile prof1, PeerProfile prof2)
    Acceptance ratio tiers: good (> 0.3) ranks above low (< 0.3), which ranks above dead (<= 0).
    (package private) static int
    ClientPeerSelector.compareActivity(PeerProfile prof1, PeerProfile prof2, long now, long thirtyMinutes)
    Peers active within the activity window sort first.
    (package private) static int
    ClientPeerSelector.compareQuality(Hash p1, Hash p2, Set<Hash> exclude, PeerProfile prof1, PeerProfile prof2, Map<Hash,Long> proven, long now, long thirtyMinutes)
    Full quality comparison cascade.
    static int
    ClientPeerSelector.compareReliability(PeerProfile prof1, PeerProfile prof2)
    Compare floodfill reliability: GOOD > OK > UNKNOWN > BAD.
    (package private) static int
    ClientPeerSelector.compareTestHistory(PeerProfile prof1, PeerProfile prof2)
    When both peers have unknown latency (lat=0), peers with a proven test history sort first.
    (package private) static boolean
    TunnelPeerSelector.hasConnectivitySignal(PeerProfile profile, long now, long activityWindow)
    Pre-qualification signal check: does the peer profile show recent connectivity evidence? Heard from or successfully sent to within the last 30 minutes, a successful tunnel test within the activity window, or any test history at all with a >50% acceptance ratio.
    (package private) static boolean
    TunnelPeerSelector.hasConnectivitySignal(PeerProfile profile, long now, long activityWindow, boolean established, int quality)
    Pre-qualification signal check at the given strictness.
    (package private) boolean
    ClientPeerSelector.isReliable(PeerProfile profile, long now, long tenMinutes, long thirtyMinutes)
    Reliability gate: the acceptance ratio must be at least 0.3, and the peer must show a recent tunnel-test success, recent activity, or an established connection.