]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/NexuizDemoRecorder/main/src/main/java/com/nexuiz/demorecorder/application/RecorderJobPoolExecutor.java
fix lots of CRLFs
[xonotic/xonotic.git] / misc / tools / NexuizDemoRecorder / main / src / main / java / com / nexuiz / demorecorder / application / RecorderJobPoolExecutor.java
index 7f4181f68aa6acb8af94593c29efccebb5d41f97..949eef5cd58a4c8774a952b573fe1f73e34136fd 100644 (file)
@@ -1,48 +1,48 @@
-package com.nexuiz.demorecorder.application;\r
-\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-import java.util.concurrent.ArrayBlockingQueue;\r
-import java.util.concurrent.ThreadPoolExecutor;\r
-import java.util.concurrent.TimeUnit;\r
-\r
-import com.nexuiz.demorecorder.application.jobs.RecordJob;\r
-\r
-public class RecorderJobPoolExecutor {\r
-       \r
-       private int poolSize = 1;\r
-       private int maxPoolSize = 1;\r
-       private long keepAliveTime = 10;\r
-       private ThreadPoolExecutor threadPool = null;\r
-       private ArrayBlockingQueue<Runnable> queue = null;\r
-\r
-       public RecorderJobPoolExecutor() {\r
-               queue = new ArrayBlockingQueue<Runnable>(99999);\r
-               threadPool = new ThreadPoolExecutor(poolSize, maxPoolSize, keepAliveTime, TimeUnit.SECONDS, queue);\r
-       }\r
-\r
-       public void runJob(Runnable task) {\r
-               threadPool.execute(task);\r
-       }\r
-       \r
-       public void clearUnfinishedJobs() {\r
-               threadPool.getQueue().clear();\r
-       }\r
-\r
-       public void shutDown() {\r
-               threadPool.shutdownNow();\r
-       }\r
-       \r
-       public synchronized List<RecordJob> getJobList() {\r
-               List<RecordJob> list = new ArrayList<RecordJob>();\r
-               for (Runnable job : this.queue) {\r
-                       try {\r
-                               RecordJob j = (RecordJob)job;\r
-                               list.add(j);\r
-                       } catch (ClassCastException e) {}\r
-               }\r
-               \r
-               return list;\r
-       }\r
-}\r
+package com.nexuiz.demorecorder.application;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import com.nexuiz.demorecorder.application.jobs.RecordJob;
+
+public class RecorderJobPoolExecutor {
+       
+       private int poolSize = 1;
+       private int maxPoolSize = 1;
+       private long keepAliveTime = 10;
+       private ThreadPoolExecutor threadPool = null;
+       private ArrayBlockingQueue<Runnable> queue = null;
+
+       public RecorderJobPoolExecutor() {
+               queue = new ArrayBlockingQueue<Runnable>(99999);
+               threadPool = new ThreadPoolExecutor(poolSize, maxPoolSize, keepAliveTime, TimeUnit.SECONDS, queue);
+       }
+
+       public void runJob(Runnable task) {
+               threadPool.execute(task);
+       }
+       
+       public void clearUnfinishedJobs() {
+               threadPool.getQueue().clear();
+       }
+
+       public void shutDown() {
+               threadPool.shutdownNow();
+       }
+       
+       public synchronized List<RecordJob> getJobList() {
+               List<RecordJob> list = new ArrayList<RecordJob>();
+               for (Runnable job : this.queue) {
+                       try {
+                               RecordJob j = (RecordJob)job;
+                               list.add(j);
+                       } catch (ClassCastException e) {}
+               }
+               
+               return list;
+       }
+}