コード例 #1
0
 @Override
 protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value) {
   if (runnable instanceof CancelableCallable) {
     DebugLog.d(TAG, "Runnable->newTaskFor CancelableCallable!!");
     return ((CancelableCallable) runnable).newTaskFor(value);
   }
   DebugLog.d(TAG, "Runnable->newTaskFor normal!!");
   return super.newTaskFor(runnable, value);
 }
コード例 #2
0
  @Override
  protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) {

    if (callable instanceof CancelableCallable) {
      DebugLog.d(TAG, "Callable->newTaskFor CancelableCallable!!");
      return ((CancelableCallable) callable).newTaskFor();
    }
    DebugLog.d(TAG, "Runnable->newTaskFor normal!!");
    return super.newTaskFor(callable);
  }
コード例 #3
0
 @Override
 protected void afterExecute(Runnable r, Throwable t) {
   super.afterExecute(r, t);
   DebugLog.d(TAG, "XThreadPoolExecutor->afterExecute !" + ((PriorityFutureTask) r).getPriority());
 }
コード例 #4
0
 @Override
 protected void beforeExecute(Thread t, Runnable r) {
   super.beforeExecute(t, r);
   DebugLog.d(TAG, "XThreadPoolExecutor->beforeExecute Thread Name:" + t.getName());
 }