Changeset dca5e98


Ignore:
Timestamp:
May 7, 2013 1:49:31 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
3210dd8, c1da7f7
Parents:
67beebf
Message:

finals

Location:
router/java/src/net/i2p/router/networkdb/kademlia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/networkdb/kademlia/PersistentDataStore.java

    r67beebf rdca5e98  
    4343 */
    4444class PersistentDataStore extends TransientDataStore {
    45     private final Log _log;
    4645    private final File _dbDir;
    4746    private final KademliaNetworkDatabaseFacade _facade;
     
    6160    public PersistentDataStore(RouterContext ctx, String dbDir, KademliaNetworkDatabaseFacade facade) throws IOException {
    6261        super(ctx);
    63         _log = ctx.logManager().getLog(PersistentDataStore.class);
    6462        _flat = ctx.getBooleanProperty(PROP_FLAT);
    6563        _dbDir = getDbDir(dbDir);
  • router/java/src/net/i2p/router/networkdb/kademlia/TransientDataStore.java

    r67beebf rdca5e98  
    2323import net.i2p.util.Log;
    2424
     25/**
     26 *  Stores in-memory only. See extension.
     27 */
    2528class TransientDataStore implements DataStore {
    26     private Log _log;
    27     private ConcurrentHashMap<Hash, DatabaseEntry> _data;
    28     protected RouterContext _context;
     29    protected final Log _log;
     30    private final ConcurrentHashMap<Hash, DatabaseEntry> _data;
     31    protected final RouterContext _context;
    2932   
    3033    public TransientDataStore(RouterContext ctx) {
    3134        _context = ctx;
    32         _log = ctx.logManager().getLog(TransientDataStore.class);
     35        _log = ctx.logManager().getLog(getClass());
    3336        _data = new ConcurrentHashMap(1024);
    3437        if (_log.shouldLog(Log.INFO))
     
    192195    public DatabaseEntry remove(Hash key) {
    193196        if (_log.shouldLog(Log.DEBUG))
    194             _log.debug("Removing key " + key.toBase64());
     197            _log.debug("Removing key " + key);
    195198        return _data.remove(key);
    196199    }
Note: See TracChangeset for help on using the changeset viewer.