diff src/goodjava/lucene/backup/BackupServer.java @ 1502:8a7b6b32c691

minor threads
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 10 May 2020 22:48:15 -0600
parents e66e3d50b289
children d80395468b4e
line wrap: on
line diff
--- a/src/goodjava/lucene/backup/BackupServer.java	Sun May 10 22:28:13 2020 -0600
+++ b/src/goodjava/lucene/backup/BackupServer.java	Sun May 10 22:48:15 2020 -0600
@@ -5,8 +5,8 @@
 import java.util.Map;
 import java.net.Socket;
 import java.net.ServerSocket;
-import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.Executors;
+import java.util.concurrent.ExecutorService;
 import javax.net.ssl.SSLServerSocketFactory;
 import javax.net.ssl.SSLServerSocket;
 import goodjava.util.SoftCacheMap;
@@ -39,7 +39,7 @@
 	}
 
 	private final File backupDir;
-	private static final ThreadPoolExecutor threadPool = (ThreadPoolExecutor)Executors.newCachedThreadPool();
+	private static final ExecutorService threadPool = Executors.newCachedThreadPool();
 	private static final Map<String,Backup> backups = new SoftCacheMap<String,Backup>();
 
 	public BackupServer(File backupDir) throws IOException {