incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [06/28] git commit: Fixing the thread pool to work with the invoke calls.
Date Wed, 15 Jan 2014 22:03:29 GMT
Fixing the thread pool to work with the invoke calls.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/b13761e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/b13761e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/b13761e2

Branch: refs/heads/master
Commit: b13761e20893584d013d803ac004d0de1e67ffc5
Parents: 7bfbe24
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Thu Jan 9 21:37:13 2014 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Jan 15 17:02:11 2014 -0500

----------------------------------------------------------------------
 blur-util/src/main/java/org/apache/blur/trace/Trace.java | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b13761e2/blur-util/src/main/java/org/apache/blur/trace/Trace.java
----------------------------------------------------------------------
diff --git a/blur-util/src/main/java/org/apache/blur/trace/Trace.java b/blur-util/src/main/java/org/apache/blur/trace/Trace.java
index 3cebe10..228e51e 100644
--- a/blur-util/src/main/java/org/apache/blur/trace/Trace.java
+++ b/blur-util/src/main/java/org/apache/blur/trace/Trace.java
@@ -209,7 +209,7 @@ public class Trace {
     }
   }
 
-  public static <V> Collection<Callable<V>> getCallables(final Collection<Callable<V>>
callables) {
+  public static <V> Collection<? extends Callable<V>> getCallables(final
Collection<? extends Callable<V>> callables) {
     TraceCollector tc = _tracer.get();
     if (tc == null) {
       return callables;
@@ -237,7 +237,6 @@ public class Trace {
     return true;
   }
 
-  @SuppressWarnings("unchecked")
   public static ExecutorService getExecutorService(final ExecutorService service) {
     return new ExecutorService() {
       ExecutorService _service = service;
@@ -259,21 +258,21 @@ public class Trace {
       }
 
       public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>>
tasks) throws InterruptedException {
-        return _service.invokeAll((Collection<? extends Callable<T>>) getCallable((Callable<T>)
tasks));
+        return _service.invokeAll(getCallables(tasks));
       }
 
       public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>>
tasks, long timeout, TimeUnit unit)
           throws InterruptedException {
-        return _service.invokeAll((Collection<? extends Callable<T>>) getCallable((Callable<T>)
tasks), timeout, unit);
+        return _service.invokeAll(getCallables(tasks), timeout, unit);
       }
 
       public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws
InterruptedException, ExecutionException {
-        return _service.invokeAny((Collection<? extends Callable<T>>) getCallable((Callable<T>)
tasks));
+        return _service.invokeAny(getCallables(tasks));
       }
 
       public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long
timeout, TimeUnit unit)
           throws InterruptedException, ExecutionException, TimeoutException {
-        return _service.invokeAny((Collection<? extends Callable<T>>) getCallable((Callable<T>)
tasks), timeout, unit);
+        return _service.invokeAny(getCallables(tasks), timeout, unit);
       }
 
       // pass-through


Mime
View raw message