make responder cache size configurable
This commit is contained in:
@ -309,7 +309,7 @@ public class Core {
|
||||
|
||||
|
||||
log.info("initializing responder cache")
|
||||
ResponderCache responderCache = new ResponderCache((int)(Math.sqrt(props.peerConnections)) + 1)
|
||||
ResponderCache responderCache = new ResponderCache(props.responderCacheSize)
|
||||
eventBus.register(UIResultBatchEvent.class, responderCache)
|
||||
|
||||
|
||||
|
@ -44,6 +44,8 @@ class MuWireSettings {
|
||||
int peerConnections
|
||||
int leafConnections
|
||||
|
||||
int responderCacheSize
|
||||
|
||||
boolean startChatServer
|
||||
int maxChatConnections
|
||||
boolean advertiseChat
|
||||
@ -111,6 +113,9 @@ class MuWireSettings {
|
||||
leafConnections = Integer.valueOf(props.getProperty("leafConnections","512"))
|
||||
peerConnections = Integer.valueOf(props.getProperty("peerConnections","128"))
|
||||
|
||||
// responder cache settings
|
||||
responderCacheSize = Integer.valueOf(props.getProperty("responderCacheSize","32"))
|
||||
|
||||
speedSmoothSeconds = Integer.valueOf(props.getProperty("speedSmoothSeconds","10"))
|
||||
totalUploadSlots = Integer.valueOf(props.getProperty("totalUploadSlots","-1"))
|
||||
uploadSlotsPerUser = Integer.valueOf(props.getProperty("uploadSlotsPerUser","-1"))
|
||||
@ -182,6 +187,9 @@ class MuWireSettings {
|
||||
props.setProperty("peerConnections", String.valueOf(peerConnections))
|
||||
props.setProperty("leafConnections", String.valueOf(leafConnections))
|
||||
|
||||
// responder cache settings
|
||||
props.setProperty("responderCacheSize", String.valueOf(responderCacheSize))
|
||||
|
||||
props.setProperty("speedSmoothSeconds", String.valueOf(speedSmoothSeconds))
|
||||
props.setProperty("totalUploadSlots", String.valueOf(totalUploadSlots))
|
||||
props.setProperty("uploadSlotsPerUser", String.valueOf(uploadSlotsPerUser))
|
||||
|
Reference in New Issue
Block a user