Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
added getRemoved method on demand from theli for migration purpose
orbiter3086e38bb18f
diff --git a/source/de/anomic/server/serverAbstractSwitch.java b/source/de/anomic/server/serverAbstractSwitch.javaindex 8f7e5b1eb..f4db5924f 100644--- a/source/de/anomic/server/serverAbstractSwitch.java+++ b/source/de/anomic/server/serverAbstractSwitch.java@@ -57,6 +57,7 @@ public abstract class serverAbstractSwitch implements serverSwitch {private final File configFile;private Map configProps;private final String configComment;+ private Map configRemoved;private final HashMap authorization;private String rootPath;private final TreeMap workerThreads;@@ -78,7 +79,8 @@ public abstract class serverAbstractSwitch implements serverSwitch {new File(configFile.getParent()).mkdir();// predefine init's- Map initProps, removedProps = new HashMap();+ Map initProps;+ configRemoved = new HashMap();if (initFile.exists())initProps = serverFileUtils.loadHashMap(initFile);else@@ -98,7 +100,7 @@ public abstract class serverAbstractSwitch implements serverSwitch {while (i.hasNext()) {key = (String) i.next();if (!(initProps.containsKey(key))) {- removedProps.put(key, this.configProps.get(key));+ configRemoved.put(key, this.configProps.get(key));i.remove();}}@@ -217,7 +219,11 @@ public abstract class serverAbstractSwitch implements serverSwitch {}}-+ public Map getRemoved() {+ // returns configuration that had been removed during initialization+ return configRemoved;+ }+// add/remove action listenerpublic void deployAction(String actionName, String actionShortDescription, String actionLongDescription,serverSwitchAction newAction) {diff --git a/source/de/anomic/server/serverSwitch.java b/source/de/anomic/server/serverSwitch.javaindex f46530888..9c269b7fd 100644--- a/source/de/anomic/server/serverSwitch.java+++ b/source/de/anomic/server/serverSwitch.java@@ -51,6 +51,8 @@ package de.anomic.server;import java.net.InetAddress;import java.util.Iterator;+import java.util.Map;+import de.anomic.server.logging.serverLog;public interface serverSwitch {@@ -93,7 +95,8 @@ public interface serverSwitch {public String getConfig(String key, String dflt);public long getConfigLong(String key, long dflt);public Iterator configKeys();-+ public Map getRemoved();+// the switchboard also shall maintain a job list// jobs can be queued by submitting a job object// to work off a queue job, use deQueue, which is meant to