public class DBHistory extends Object
Constructor and Description |
---|
DBHistory(RouterContext context,
String statGroup) |
Modifier and Type | Method and 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 investigated
|
long |
getLastLookupFailed()
Not persisted until 0.9.24
|
long |
getLastLookupSuccessful()
Not persisted until 0.9.24
|
long |
getLastStoreFailed()
Not persisted until 0.9.24
|
long |
getLastStoreSuccessful()
Not persisted until 0.9.24
|
long |
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 way
|
void |
lookupReply(int newPeers,
int oldPeers,
int invalid,
int duplicate)
Receive a lookup reply from the peer, where they gave us the specified info
|
void |
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) |
void |
storeFailed()
Note that floodfill verify failed
|
void |
storeSuccessful()
Note that we successfully stored to a floodfill peer and verified the result
by asking another floodfill peer
|
void |
unpromptedStoreReceived(boolean wasNew)
Note that the peer sent us a data point without us asking for it
|
public DBHistory(RouterContext context, String statGroup)
public long getLastLookupSuccessful()
public long getLastLookupFailed()
public long getLastStoreSuccessful()
public long getLastStoreFailed()
public long getUnpromptedDbStoreNew()
public long getUnpromptedDbStoreOld()
public RateStat getFailedLookupRate()
public RateStat getInvalidReplyRate()
public void lookupSuccessful()
public void lookupFailed()
public void storeSuccessful()
public void storeFailed()
public void lookupReply(int newPeers, int oldPeers, int invalid, int duplicate)
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)public void unpromptedStoreReceived(boolean wasNew)
wasNew
- whether we already knew about this data point or notpublic void setUnpromptedDbStoreNew(long num)
public void setUnpromptedDbStoreOld(long num)
public void coalesceStats()
public void store(OutputStream out) throws IOException
IOException
public void load(Properties props)