remove more unused from legacy server.http

- triggerOnlineAction not used
- useTemplateCache not used
pull/1/head
reger 11 years ago
parent 749d020aeb
commit a373fb717d

@ -851,10 +851,6 @@ useYacyReferer = false
# if you want to tunnel other protocols, set to false # if you want to tunnel other protocols, set to false
secureHttps = true secureHttps = true
# specifies if the httpdFileHandler should cache
# the template-files from the htroot directory
enableTemplateCache = true
# specifies if the http post body should be transfered # specifies if the http post body should be transfered
# using content-encoding gzip during index transfer # using content-encoding gzip during index transfer
# a) indexDistribution: which is done periodically if you have enabled # a) indexDistribution: which is done periodically if you have enabled

@ -71,7 +71,6 @@ public class Network
public static final ThreadGroup publishThreadGroup = new ThreadGroup("publishThreadGroup"); public static final ThreadGroup publishThreadGroup = new ThreadGroup("publishThreadGroup");
public static final HashMap<String, String> seedUploadMethods = new HashMap<String, String>(); public static final HashMap<String, String> seedUploadMethods = new HashMap<String, String>();
public static final ConcurrentLog log = new ConcurrentLog("YACY"); public static final ConcurrentLog log = new ConcurrentLog("YACY");
public static long lastOnlineTime = 0;
/** pseudo-random key derived from a time-interval while YaCy startup */ /** pseudo-random key derived from a time-interval while YaCy startup */
public static long speedKey = 0; public static long speedKey = 0;
public static long magic = System.currentTimeMillis(); public static long magic = System.currentTimeMillis();
@ -121,11 +120,6 @@ public class Network
// ATTENTION, VERY IMPORTANT: before starting the thread, the httpd yacy server must be running! // ATTENTION, VERY IMPORTANT: before starting the thread, the httpd yacy server must be running!
speedKey = System.currentTimeMillis() - time; speedKey = System.currentTimeMillis() - time;
lastOnlineTime = 0;
}
synchronized static public void triggerOnlineAction() {
lastOnlineTime = System.currentTimeMillis();
} }
public final void publishSeedList() { public final void publishSeedList() {

@ -77,19 +77,11 @@ public final class HTTPDFileHandler {
private static File htLocalePath = null; private static File htLocalePath = null;
public static String indexForward = ""; public static String indexForward = "";
protected static final class TemplateCacheEntry {
Date lastModified;
byte[] content;
}
public static final boolean useTemplateCache;
//private Properties connectionProperties = null; //private Properties connectionProperties = null;
// creating a logger // creating a logger
static { static {
final serverSwitch theSwitchboard = Switchboard.getSwitchboard(); final serverSwitch theSwitchboard = Switchboard.getSwitchboard();
useTemplateCache = theSwitchboard.getConfig("enableTemplateCache","true").equalsIgnoreCase("true");
if (switchboard == null) { if (switchboard == null) {
switchboard = theSwitchboard; switchboard = theSwitchboard;

@ -121,7 +121,7 @@ public final class HTTPDProxyHandler {
if (sb != null) { if (sb != null) {
// set timeout // set timeout
timeout = Integer.parseInt(sb.getConfig("proxy.clientTimeout", "60000")); timeout = sb.getConfigInt("proxy.clientTimeout", 60000);
// do logger initialization // do logger initialization
try { try {
@ -276,7 +276,6 @@ public final class HTTPDProxyHandler {
// remembering the starting time of the request // remembering the starting time of the request
final Date requestDate = new Date(); // remember the time... final Date requestDate = new Date(); // remember the time...
conProp.put(HeaderFramework.CONNECTION_PROP_REQUEST_START, Long.valueOf(requestDate.getTime())); conProp.put(HeaderFramework.CONNECTION_PROP_REQUEST_START, Long.valueOf(requestDate.getTime()));
if (yacyTrigger) net.yacy.peers.Network.triggerOnlineAction();
sb.proxyLastAccess = System.currentTimeMillis(); sb.proxyLastAccess = System.currentTimeMillis();
// using an ByteCount OutputStream to count the send bytes (needed for the logfile) // using an ByteCount OutputStream to count the send bytes (needed for the logfile)

Loading…
Cancel
Save