added getRemoved method on demand from theli for migration purpose

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1195 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 61bded057a
commit 3086e38bb1

@ -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,6 +219,10 @@ public abstract class serverAbstractSwitch implements serverSwitch {
}
}
public Map getRemoved() {
// returns configuration that had been removed during initialization
return configRemoved;
}
// add/remove action listener
public void deployAction(String actionName, String actionShortDescription, String actionLongDescription,

@ -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,6 +95,7 @@ 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

Loading…
Cancel
Save