Changeset 94e5aaf


Ignore:
Timestamp:
Jun 18, 2011 9:43:59 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
e468633
Parents:
0fa5fa4
Message:

javadoc and more clearing at shutdown

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/peermanager/PeerManager.java

    r0fa5fa4 r94e5aaf  
    5353    private static final long REORGANIZE_TIME_LONG = 551*1000;
    5454   
     55    /**
     56     *  Warning - this loads all the profiles in the constructor.
     57     *  This may take a long time - 30 seconds or more.
     58     *  Instantiate this in a Job or Thread.
     59     */
    5560    public PeerManager(RouterContext context) {
    5661        _context = context;
     
    103108    void clearProfiles() {
    104109        _organizer.clearProfiles();
     110        _capabilitiesByPeer.clear();
     111        for (int i = 0; i < _peersByCapability.length; i++)
     112            _peersByCapability[i].clear();
    105113    }
    106114
     
    117125    }
    118126
     127    /**
     128     *  This may take a long time - 30 seconds or more
     129     */
    119130    void loadProfiles() {
    120         // TODO do this in a Thread or a Job to not slow down the constructor
    121131        Set<PeerProfile> profiles = _persistenceHelper.readProfiles();
    122132        for (Iterator<PeerProfile> iter = profiles.iterator(); iter.hasNext();) {
Note: See TracChangeset for help on using the changeset viewer.