Java Thread Executor getConstantLookup()

Here you can find the source of getConstantLookup()

Description

get Constant Lookup

License

Apache License

Declaration

private static Map<String, String> getConstantLookup() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class Main {
    private static Map<String, String> getConstantLookup() {
        Map<String, String> toRet = new HashMap<>();
        toRet.put("java.util.concurrent.BlockingDeque", "BLOCKING_DEQUE");
        toRet.put("java.util.concurrent.BlockingQueue", "BLOCKING_QUEUE");
        toRet.put("java.util.concurrent.Callable", "CALLABLE");
        toRet.put("java.util.concurrent.CompletionService",
                "COMPLETION_SERVICE");
        toRet.put("java.util.concurrent.ConcurrentMap", "CONCURRENT_MAP");
        toRet.put("java.util.concurrent.ConcurrentNavigableMap",
                "CONCURRENT_NAVIGABLE_MAP");
        toRet.put("java.util.concurrent.Delayed", "DELAYED");
        toRet.put("java.util.concurrent.Executor", "EXECUTOR");
        toRet.put("java.util.concurrent.ExecutorService",
                "EXECUTOR_SERVICE");
        toRet.put("java.util.concurrent.Future", "FUTURE");
        toRet.put("java.util.concurrent.RejectedExecutionHandler",
                "REJECTED_EXECUTION_HANDLER");
        toRet.put("java.util.concurrent.RunnableFuture", "RUNNABLE_FUTURE");
        toRet.put("java.util.concurrent.RunnableScheduledFuture",
                "RUNNABLE_SCHEDULED_FUTURE");
        toRet.put("java.util.concurrent.ScheduledExecutorService",
                "SCHEDULED_EXECUTOR_SERVICE");
        toRet.put("java.util.concurrent.ScheduledFuture",
                "SCHEDULED_FUTURE");
        toRet.put("java.util.concurrent.ThreadFactory", "THREAD_FACTORY");
        toRet.put("java.util.concurrent.AbstractExecutorService",
                "ABSTRACT_EXECUTOR_SERVICE");
        toRet.put("java.util.concurrent.ArrayBlockingQueue",
                "ARRAY_BLOCKING_QUEUE");
        toRet.put("java.util.concurrent.ConcurrentHashMap",
                "CONCURRENT_HASH_MAP");
        toRet.put("java.util.concurrent.ConcurrentLinkedQueue",
                "CONCURRENT_LINKED_QUEUE");
        toRet.put("java.util.concurrent.ConcurrentSkipListMap",
                "CONCURRENT_SKIP_LIST_MAP");
        toRet.put("java.util.concurrent.ConcurrentSkipListSet",
                "CONCURRENT_SKIP_LIST_SET");
        toRet.put("java.util.concurrent.CopyOnWriteArrayList",
                "COPY_ON_WRITE_ARRAY_LIST");
        toRet.put("java.util.concurrent.CopyOnWriteArraySet",
                "COPY_ON_WRITE_ARRAY_SET");
        toRet.put("java.util.concurrent.CountDownLatch", "COUNT_DOWN_LATCH");
        toRet.put("java.util.concurrent.CyclicBarrier", "CYCLIC_BARRIER");
        toRet.put("java.util.concurrent.DelayQueue", "DELAY_QUEUE");
        toRet.put("java.util.concurrent.Exchanger", "EXCHANGER");
        toRet.put("java.util.concurrent.ExecutorCompletionService",
                "EXECUTOR_COMPLETION_SERVICE");
        toRet.put("java.util.concurrent.Executors", "EXECUTORS");
        toRet.put("java.util.concurrent.FutureTask", "FUTURE_TASK");
        toRet.put("java.util.concurrent.LinkedBlockingDeque",
                "LINKED_BLOCKING_DEQUE");
        toRet.put("java.util.concurrent.LinkedBlockingQueue",
                "LINKED_BLOCKING_QUEUE");
        toRet.put("java.util.concurrent.PriorityBlockingQueue",
                "PRIORITY_BLOCKING_QUEUE");
        toRet.put("java.util.concurrent.ScheduledThreadPoolExecutor",
                "SCHEDULED_THREAD_POOL_EXECUTOR");
        toRet.put("java.util.concurrent.Semaphore", "SEMAPHORE");
        toRet.put("java.util.concurrent.SynchronousQueue",
                "SYNCHRONOUS_QUEUE");
        toRet.put("java.util.concurrent.ThreadPoolExecutor",
                "THREAD_POOL_EXECUTOR");
        toRet.put("java.util.concurrent.ThreadPoolExecutor",
                "THREAD_POOL_EXECUTOR");
        toRet.put("java.util.concurrent.ThreadPoolExecutor$AbortPolicy",
                "ABORT_POLICY");
        toRet.put(/*ww w.  jav a 2  s.c o m*/
                "java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy",
                "CALLER_RUNS_POLICY");
        toRet.put(
                "java.util.concurrent.ThreadPoolExecutor$DiscardOldestPolicy",
                "DISCARD_OLDEST_POLICY");
        toRet.put("java.util.concurrent.ThreadPoolExecutor$DiscardPolicy",
                "DISCARD_POLICY");
        toRet.put("java.util.concurrent.TimeUnit", "TIME_UNIT");
        toRet.put("java.util.concurrent.BrokenBarrierException",
                "BROKEN_BARRIER_EXCEPTION");
        toRet.put("java.util.concurrent.CancellationException",
                "CANCELLATION_EXCEPTION");
        toRet.put("java.util.concurrent.ExecutionException",
                "EXECUTION_EXCEPTION");
        toRet.put("java.util.concurrent.RejectedExecutionException",
                "REJECTED_EXECUTION_EXCEPTION");
        toRet.put("java.util.concurrent.TimeoutException",
                "TIMEOUT_EXCEPTION");
        return Collections.unmodifiableMap(toRet);
    }
}

Related

  1. addExecutorShutdownHook(final ExecutorService exec)
  2. addThread(Runnable runnable)
  3. convert(Runnable runnable, T result)
  4. getActiveHelperInstanceCount(String helperName)
  5. getChannelService()
  6. getThreadExecutor(int nThreads)
  7. isCorrectCollectionSizeTimeOut(Collection collection, int size, long timeout, TimeUnit unit)
  8. isRegularlyDone(Future future)
  9. isShutdown(Executor executor)