随笔分类 -  java学习过程中遇到的问题

在java学习过程中遇到的问题。以及曾经面试过程中遇到的问题。
摘要:FutureTask<V>实现了RunnableFuture<V>接口。内部变量包含Sync类型的变量sync。 public V get() throws InterruptedException, ExecutionException { return sync.innerGet(); } 为对 阅读全文
posted @ 2017-08-28 15:23 菜鸟麦迪粉 阅读(160) 评论(0) 推荐(0)
摘要:AQS内部采用CLH队列。CLH队列是由节点组成。内部的Node节点包含的状态有 static final int CANCELLED = 1; static final int SIGNAL = -1; static final int CONDITION = -2; static final i 阅读全文
posted @ 2017-08-25 17:26 菜鸟麦迪粉 阅读(417) 评论(0) 推荐(0)
摘要:DelayQueue<E>继承于AbstractQueue<E>实现BlockingQueue<E> 内部变量包括ReentrantLock 类型的lock以及条件Condition类型的available 同时内部维护一个优先级队列q。 内部的方法offer(E e): public boolea 阅读全文
posted @ 2017-08-23 11:41 菜鸟麦迪粉 阅读(241) 评论(0) 推荐(0)
摘要:ScheduledThreadPoolExecutor继承与基础线程池类ThreadPoolExecutor并实现ScheduledExecutorService接口。 其中ScheduledExecutorService继承与ExecutorService接口并添加了scheduleAtFixed 阅读全文
posted @ 2017-08-21 18:33 菜鸟麦迪粉 阅读(856) 评论(0) 推荐(0)