This commit is contained in:
@@ -680,21 +680,21 @@ public final class Application {
|
||||
runServers(timecd, watchs); //必须在所有服务都启动后再启动WATCH服务
|
||||
timecd.await();
|
||||
//if (!singletonrun) signalHandle();
|
||||
if (!singletonrun) clearPersistData();
|
||||
//if (!singletonrun) clearPersistData();
|
||||
logger.info(this.getClass().getSimpleName() + " started in " + (System.currentTimeMillis() - startTime) + " ms\r\n");
|
||||
if (!singletonrun) this.serversLatch.await();
|
||||
}
|
||||
|
||||
private void clearPersistData() {
|
||||
File cachedir = new File(home, "cache");
|
||||
if (!cachedir.isDirectory()) return;
|
||||
File[] lfs = cachedir.listFiles();
|
||||
if (lfs != null) {
|
||||
for (File file : lfs) {
|
||||
if (file.getName().startsWith("persist-")) file.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
// private void clearPersistData() {
|
||||
// File cachedir = new File(home, "cache");
|
||||
// if (!cachedir.isDirectory()) return;
|
||||
// File[] lfs = cachedir.listFiles();
|
||||
// if (lfs != null) {
|
||||
// for (File file : lfs) {
|
||||
// if (file.getName().startsWith("persist-")) file.delete();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// private void signalHandle() {
|
||||
// //http://www.comptechdoc.org/os/linux/programming/linux_pgsignals.html
|
||||
|
||||
@@ -551,10 +551,9 @@ public final class ClassFilter<T> {
|
||||
} else if (root.isDirectory()) {
|
||||
if (exclude != null && exclude.equals(root)) return;
|
||||
File[] lfs = root.listFiles();
|
||||
if (lfs != null) {
|
||||
for (File f : lfs) {
|
||||
loadClassFiles(exclude, f, files);
|
||||
}
|
||||
if (lfs == null) throw new RuntimeException("File(" + root + ") cannot listFiles()");
|
||||
for (File f : lfs) {
|
||||
loadClassFiles(exclude, f, files);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -397,10 +397,9 @@ public abstract class Server<K extends Serializable, C extends Context, R extend
|
||||
File root = new File(s.substring(0, s.length() - 1));
|
||||
if (root.isDirectory()) {
|
||||
File[] lfs = root.listFiles();
|
||||
if (lfs != null) {
|
||||
for (File f : lfs) {
|
||||
set.add(f.toURI().toURL());
|
||||
}
|
||||
if (lfs == null) throw new RuntimeException("File(" + root + ") cannot listFiles()");
|
||||
for (File f : lfs) {
|
||||
set.add(f.toURI().toURL());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user