fixed makerelease & clean-up of dead code

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@33 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 20 years ago
parent b61567a39e
commit 97ec8d65e4

@ -40,7 +40,7 @@ globalheader();
<br><p>v0.37
<ul>
<li>Check on new peer names: must not occur already and may only contain letters, numbers and '_' or '-'.</li>
<li></li>
<li>New ThreadPool and performance enhancements from Martin Thelian</li>
<li></li>
<li></li>
<li></li>

@ -45,18 +45,18 @@
# Contributions and changes to the program code must be marked as such.
# define variables
version='0.361'
version='0.363'
datestr=`date +%Y%m%d`
#release='yacy_v'$version'_'$datestr
release='yacy_dev_v'$version'_'$datestr
target='RELEASE'
classes='classes'
source='source'
lib='lib'
source='source'
doc='doc'
data='DATA'
mainclass='yacy.java'
classpath='$classes:$lib'
classpath='$classes:lib/commons-collections.jar:lib/commons-pool-1.2.jar'
mkdir $release
@ -103,8 +103,8 @@ mkdir $target
# compile core
mv -f $source/$mainclass $source/$mainclass.orig
sed `echo 's/<<REPL_DATE>>/'$datestr'/'` $source/$mainclass.orig > $source/$mainclass.sed1
sed `echo 's/<<REPL_VERSION>>/'$version'/'` $source/$mainclass.sed1 > $source/$mainclass
sed `echo 's/@REPL_DATE@/'$datestr'/'` $source/$mainclass.orig > $source/$mainclass.sed1
sed `echo 's/@REPL_VERSION@/'$version'/'` $source/$mainclass.sed1 > $source/$mainclass
rm $source/$mainclass.sed1
#javac -classpath $classpath -sourcepath $source -d $classes -g:none $source/httpd.java
#javac -classpath $classpath -sourcepath $source -d $classes -g:none $source/$mainclass
@ -130,11 +130,15 @@ javac -classpath $classes -sourcepath htroot/htdocsdefault -d htroot/htdocsdefau
mkdir $release/$classes
cp -R $classes/* $release/$classes/
# copy libs
mkdir $release/$lib
cp -R $lib/* $release/$lib/
# copy configuration files
cp yacy.init $release
cp yacy.yellow $release
#cp yacy.black $release
#cp yacy.blue $release
cp yacy.blue $release
cp yacy.stopwords $release
cp httpd.mime $release
cp superseed.txt $release
@ -239,6 +243,8 @@ chmod 644 $release/$classes/de/anomic/net/*.class
chmod 644 $release/$classes/de/anomic/plasma/*.class
chmod 644 $release/$classes/de/anomic/server/*.class
chmod 644 $release/$classes/de/anomic/yacy/*.class
chmod 755 $release/$lib
chmod 644 $release/$lib/*
chmod 755 $release/$doc
chmod 644 $release/$doc/*
chmod 755 $release/$doc/grafics

@ -391,7 +391,7 @@ public class plasmaSwitchboard extends serverAbstractSwitch implements serverSwi
}
public synchronized void deQueue() {
if (serverJobs < 5) {
if (serverJobs < 6) {
if (processStack.size() > 0) {
processResourceStack((plasmaHTCache.Entry) processStack.removeFirst());
}

@ -5,6 +5,8 @@
// Frankfurt, Germany, 2002-2004
// last major change: 09.03.2004
//
// ThreadPool
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
@ -54,7 +56,6 @@ import java.net.ServerSocket;
import java.net.Socket;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.Hashtable;
// needed for ssl
@ -80,18 +81,14 @@ public final class serverCore extends serverAbstractThread implements serverThre
private int port; // the listening port
private ServerSocket socket; // listener
private int maxSessions = 0; // max. number of sessions; 0=unlimited
serverLog log; // log object
//private serverSwitch switchboard; // external values
serverLog log; // log object
private int timeout; // connection time-out of the socket
// private Hashtable activeThreads; // contains the active threads
// private Hashtable sleepingThreads; // contains the threads that are alive since the sleepthreashold
private boolean termSleepingThreads; // if true then threads over sleepthreashold are killed
private int thresholdActive = 5000; // after that time a thread should have got a command line
private int thresholdSleep = 30000; // after that time a thread is considered as beeing sleeping (30 seconds)
private int thresholdDead = 3600000; // after that time a thread is considered as beeing dead-locked (1 hour)
serverHandler handlerPrototype;// the command class (a serverHandler)
private int thresholdSleep = 30000; // after that time a thread is considered as beeing sleeping (30 seconds)
private int thresholdDead = 3600000; // after that time a thread is considered as beeing dead-locked (1 hour)
serverHandler handlerPrototype; // the command class (a serverHandler)
private Class[] initHandlerClasses; // the init's methods arguments
private Class[] initSessionClasses; // the init's methods arguments
private serverSwitch switchboard; // the command class switchboard
@ -327,7 +324,7 @@ public final class serverCore extends serverAbstractThread implements serverThre
public void close() {
try {
// consuming the isInterrupted Flag. Otherwise we could not properly colse the session pool
// consuming the isInterrupted Flag. Otherwise we could not properly close the session pool
Thread.interrupted();
// close the session pool
@ -349,89 +346,6 @@ public final class serverCore extends serverAbstractThread implements serverThre
return (this.theSessionPool.getNumActive() == 0);
}
// public void idleThreadCheck() {
// // a 'garbage collector' for session threads
// Enumeration threadEnum;
// Session session;
//
// // look for sleeping threads
// threadEnum = activeThreads.keys();
// long time;
// while (threadEnum.hasMoreElements()) {
// session = (Session) (threadEnum.nextElement());
// //if (session.request == null) session.interrupt();
// if (session.isAlive()) {
// // check if socket still exists
// time = System.currentTimeMillis() - ((Long) activeThreads.get(session)).longValue();
// if (/*(session.controlSocket.isClosed()) || */
// (!(session.controlSocket.isBound())) ||
// (!(session.controlSocket.isConnected())) ||
// ((session.request == null) && (time > 1000))) {
// // kick it
// try {
// session.out.close();
// session.in.close();
// session.controlSocket.close();
// } catch (IOException e) {}
// session.interrupt(); // hopefully this wakes him up.
// activeThreads.remove(session);
// String reason = "";
// if (session.controlSocket.isClosed()) reason = "control socked closed";
// if (!(session.controlSocket.isBound())) reason = "control socked unbound";
// if (!(session.controlSocket.isConnected())) reason = "control socked not connected";
// if (session.request == null) reason = "no request placed";
// log.logDebug("* canceled disconnected connection (" + reason + ") '" + session.request + "'");
// } else if (time > thresholdSleep) {
// // move thread from the active threads to the sleeping
// sleepingThreads.put(session, activeThreads.remove(session));
// log.logDebug("* sleeping connection '" + session.request + "'");
// } else if ((time > thresholdActive) && (session.request == null)) {
// // thread is not in use (or too late). kickk it.
// try {
// session.out.close();
// session.in.close();
// session.controlSocket.close();
// } catch (IOException e) {}
// session.interrupt(); // hopefully this wakes him up.
// activeThreads.remove(session);
// log.logDebug("* canceled inactivated connection");
// }
// } else {
// // the thread is dead, remove it
// log.logDebug("* normal close of connection to '" + session.request + "', time=" + session.getTime());
// activeThreads.remove(session);
// }
// }
//
// // look for dead threads
// threadEnum = sleepingThreads.keys();
// while (threadEnum.hasMoreElements()) {
// session = (Session) (threadEnum.nextElement());
// if (session.isAlive()) {
// // check the age of the thread
// if (System.currentTimeMillis() - ((Long) sleepingThreads.get(session)).longValue() > thresholdDead) {
// // kill the thread
// if (termSleepingThreads) {
// try {
// session.out.close();
// session.in.close();
// session.controlSocket.close();
// } catch (IOException e) {}
// session.interrupt(); // hopefully this wakes him up.
// }
// sleepingThreads.remove(session);
// log.logDebug("* out-timed connection '" + session.request + "'");
// }
// } else {
// // the thread is dead, remove it
// sleepingThreads.remove(session);
// log.logDebug("* dead connection '" + session.request + "'");
// }
// }
//
// }
public final class SessionPool extends GenericObjectPool
{
public boolean isClosed = false;

@ -78,8 +78,8 @@ import de.anomic.yacy.*;
public final class yacy {
// static objects
private static final String vString = "0.361";
private static final String vDATE = "20050419";
private static final String vString = "@REPL_VERSION@";
private static final String vDATE = "@REPL_DATE@";
private static final String copyright = "[ YACY Proxy v" + vString + ", build " + vDATE + " by Michael Christen / www.yacy.net ]";
private static final String hline = "-------------------------------------------------------------------------------";

@ -0,0 +1 @@
testblue
Loading…
Cancel
Save