Java Learning Note 9.20

Source: Internet
Author: User

Interruptedexception:

http://blog.csdn.net/srzhz/article/details/6804756

1. A thread that is sleeping,awaiting or times occupied (blocking state), the interrupt throws Interruptedexception:

But is not the position, and also will not be broken thread, to manually interrupt

2. Interrupt flag position bit when interrupt

3. Non-blocking state is interrupted without generating interruptedexception

Read-write Lock (Reentrantreadwritelock):

Construct lock object; get read/write Lock (Readlock () method); Add read and write lock to method

blocking queues

Concurrent Container Concurrenthashmap:

Http://www.cnblogs.com/dolphin0520/p/3932905.html

Collection interface:

Iterator and Iterable:

The Iterable interface has only one method to produce an iterator class, and the iterator class needs to be defined in the class itself.

The queue inherits the Cllection interface, and the collection interface inherits the Iterable interface.

Java Learning Note 9.20

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.