Package net.i2p.router.peermanager
Class DBHistory
java.lang.Object
net.i2p.router.peermanager.DBHistory
public class DBHistory extends Object
History of NetDb related activities (lookups, replies, stores, etc)
-
Constructor Summary
Constructors Constructor Description DBHistory(RouterContext context, String statGroup)
-
Method Summary
Modifier and Type Method Description void
coalesceStats()
RateStat
getFailedLookupRate()
how often does the peer fail to reply to a lookup request, broken into 1 hour and 1 day periods.RateStat
getInvalidReplyRate()
not sure how much this is used, to be investigatedlong
getLastLookupFailed()
Not persisted until 0.9.24long
getLastLookupSuccessful()
Not persisted until 0.9.24long
getLastStoreFailed()
Not persisted until 0.9.24long
getLastStoreSuccessful()
Not persisted until 0.9.24long
getUnpromptedDbStoreNew()
how many times have they sent us data we didn't ask for and that we've never seen?long
getUnpromptedDbStoreOld()
how many times have they sent us data we didn't ask for but that we have seen?void
load(Properties props)
void
lookupFailed()
Note that the peer failed to respond to the db lookup in any wayvoid
lookupReply(int newPeers, int oldPeers, int invalid, int duplicate)
Receive a lookup reply from the peer, where they gave us the specified infovoid
lookupSuccessful()
Note that the peer was not only able to respond to the lookup, but sent us the data we wanted!void
setUnpromptedDbStoreNew(long num)
void
setUnpromptedDbStoreOld(long num)
void
store(OutputStream out)
write out the data from the profile to the stream includes commentsvoid
store(OutputStream out, boolean addComments)
write out the data from the profile to the streamvoid
storeFailed()
Note that floodfill verify failedvoid
storeSuccessful()
Note that we successfully stored to a floodfill peer and verified the result by asking another floodfill peervoid
unpromptedStoreReceived(boolean wasNew)
Note that the peer sent us a data point without us asking for it
-
Constructor Details
-
Method Details
-
getLastLookupSuccessful
public long getLastLookupSuccessful()Not persisted until 0.9.24- Since:
- 0.7.8
-
getLastLookupFailed
public long getLastLookupFailed()Not persisted until 0.9.24- Since:
- 0.7.8
-
getLastStoreSuccessful
public long getLastStoreSuccessful()Not persisted until 0.9.24- Since:
- 0.7.8
-
getLastStoreFailed
public long getLastStoreFailed()Not persisted until 0.9.24- Since:
- 0.7.8
-
getUnpromptedDbStoreNew
public long getUnpromptedDbStoreNew()how many times have they sent us data we didn't ask for and that we've never seen? -
getUnpromptedDbStoreOld
public long getUnpromptedDbStoreOld()how many times have they sent us data we didn't ask for but that we have seen? -
getFailedLookupRate
how often does the peer fail to reply to a lookup request, broken into 1 hour and 1 day periods. -
getInvalidReplyRate
not sure how much this is used, to be investigated -
lookupSuccessful
public void lookupSuccessful()Note that the peer was not only able to respond to the lookup, but sent us the data we wanted! -
lookupFailed
public void lookupFailed()Note that the peer failed to respond to the db lookup in any way -
storeSuccessful
public void storeSuccessful()Note that we successfully stored to a floodfill peer and verified the result by asking another floodfill peer- Since:
- 0.7.8
-
storeFailed
public void storeFailed()Note that floodfill verify failed- Since:
- 0.7.8
-
lookupReply
public void lookupReply(int newPeers, int oldPeers, int invalid, int duplicate)Receive a lookup reply from the peer, where they gave us the specified info- Parameters:
newPeers
- number of peers we have never seen beforeoldPeers
- number of peers we have seen beforeinvalid
- number of peers that are invalid / out of date / otherwise b0rkedduplicate
- number of peers we asked them not to give us (though they're allowed to send us themselves if they don't know anyone else)
-
unpromptedStoreReceived
public void unpromptedStoreReceived(boolean wasNew)Note that the peer sent us a data point without us asking for it- Parameters:
wasNew
- whether we already knew about this data point or not
-
setUnpromptedDbStoreNew
public void setUnpromptedDbStoreNew(long num) -
setUnpromptedDbStoreOld
public void setUnpromptedDbStoreOld(long num) -
coalesceStats
public void coalesceStats() -
store
write out the data from the profile to the stream includes comments- Throws:
IOException
-
store
write out the data from the profile to the stream- Parameters:
addComments
- add comment lines to the output- Throws:
IOException
- Since:
- 0.9.41
-
load
-