forked from I2P_Developers/i2p.i2p
finals
This commit is contained in:
@@ -42,7 +42,6 @@ import net.i2p.util.SecureFileOutputStream;
|
||||
*
|
||||
*/
|
||||
class PersistentDataStore extends TransientDataStore {
|
||||
private final Log _log;
|
||||
private final File _dbDir;
|
||||
private final KademliaNetworkDatabaseFacade _facade;
|
||||
private final Writer _writer;
|
||||
@@ -60,7 +59,6 @@ class PersistentDataStore extends TransientDataStore {
|
||||
*/
|
||||
public PersistentDataStore(RouterContext ctx, String dbDir, KademliaNetworkDatabaseFacade facade) throws IOException {
|
||||
super(ctx);
|
||||
_log = ctx.logManager().getLog(PersistentDataStore.class);
|
||||
_flat = ctx.getBooleanProperty(PROP_FLAT);
|
||||
_dbDir = getDbDir(dbDir);
|
||||
_facade = facade;
|
||||
|
||||
@@ -22,14 +22,17 @@ import net.i2p.data.RouterInfo;
|
||||
import net.i2p.router.RouterContext;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
/**
|
||||
* Stores in-memory only. See extension.
|
||||
*/
|
||||
class TransientDataStore implements DataStore {
|
||||
private Log _log;
|
||||
private ConcurrentHashMap<Hash, DatabaseEntry> _data;
|
||||
protected RouterContext _context;
|
||||
protected final Log _log;
|
||||
private final ConcurrentHashMap<Hash, DatabaseEntry> _data;
|
||||
protected final RouterContext _context;
|
||||
|
||||
public TransientDataStore(RouterContext ctx) {
|
||||
_context = ctx;
|
||||
_log = ctx.logManager().getLog(TransientDataStore.class);
|
||||
_log = ctx.logManager().getLog(getClass());
|
||||
_data = new ConcurrentHashMap(1024);
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info("Data Store initialized");
|
||||
@@ -191,7 +194,7 @@ class TransientDataStore implements DataStore {
|
||||
|
||||
public DatabaseEntry remove(Hash key) {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Removing key " + key.toBase64());
|
||||
_log.debug("Removing key " + key);
|
||||
return _data.remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user