Java BlockingQueue

  Рет қаралды 38,315

Jakob Jenkov

Jakob Jenkov

Күн бұрын

The Java BlockingQueue interface represents a queue which can block threads inserting elements into the queue if the BlockingQueue is full, or thread removing elements from the queue if the BlockingQueue is empty.
Chapters:
0:00 Java BlockingQueue introduction
1:43 BlockingQueue interface implementations
2:11 BlockingQueue basic usage
3:27 Producer Consumer example
7:10 BlockingQueue enqueue methods
10:18 BlockingQueue dequeue methods
13:25 BlockingQueue drainTo() methods
14:42 BlockingQueue peek methods
15:53 BlockingQueue size(), remainingCapacity() and contains() methods
Java BlockingQueue tutorial - text:
tutorials.jenkov.com/java-util...
Java Concurrency tutorial - text / video playlist:
tutorials.jenkov.com/java-conc...
• Java Concurrency and M...
Java Queue tutorial - text / video:
tutorials.jenkov.com/java-coll...
• Java Queue

Пікірлер: 64
@monishwankhade7541
@monishwankhade7541 3 жыл бұрын
youtube algo isn't doing you justice, i don't remember how i found you but i'm glad i did,i just read the java tutorial to brush up my java basics Thanks a lot for the work you're doing.
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Thank you very much - and you are welcome! :-) I am glad my tutorials have been helpful! :-)
@berlincmos
@berlincmos Жыл бұрын
I have been watching videos on KZbin to learn more if i need more Information about any topic in Java, and I must say, Jakob's content has been exceptional. Whether it's his videos or his website, I always find myself coming back for more information. The content provided is incredibly rich and informative. Jakob's videos are well-presented, engaging, and easy to follow. He has a knack for explaining complex Java concepts in a clear and concise manner. I truly appreciate the effort and dedication Jakob puts into creating such valuable resources for the Java community. Thanks to him. I highly recommend his videos and website to anyone seeking reliable and comprehensive Java information. Once again, thank you, Jakob, for your outstanding work! Many greetings from Iraq dear Jakob
@JakobJenkov
@JakobJenkov Жыл бұрын
Thank you very much for these kind words ! I am happy that my tutorials are helpful to you !! 😊
@byeonggilpark2078
@byeonggilpark2078 3 жыл бұрын
Keep working on these series! Thank you so much
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are welcome! I have a few more videos planned in the Java Concurrency series :-)
@svalyavasvalyava9867
@svalyavasvalyava9867 3 жыл бұрын
Jakob, thanks a ton for what you're doing. 😌
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are welcome! :-)
@panel2844
@panel2844 3 жыл бұрын
Jakob, your videos are incredible. By far the most informative and excellently explained Java videos on here. Would you consider doing a video on exception handling?
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Thank you! I already have one video about the Java try-with-resources construct, which explains one of the more advanced Java exception handling constructs. Not sure if that is enough for your needs, but at least its a place to start :-)
@mohammedsardar1517
@mohammedsardar1517 Жыл бұрын
Jakob, you got a so much grace when explaining technical thing to others. Looking forward to see more video of this kind. I wish I could have you as my teacher during school or college. Thanks and Good luck.
@JakobJenkov
@JakobJenkov Жыл бұрын
Thank you - that is very kind of you to say :-)
@bigbeast007
@bigbeast007 4 ай бұрын
Great video Jakob! Very well explained and at a very nice pace. Thank you so much!
@JakobJenkov
@JakobJenkov 4 ай бұрын
You are welcome !! I am happy it was useful to you !! 😊
@takeshiasahi5494
@takeshiasahi5494 3 жыл бұрын
I found u through your website .... you are the reason i cleared my java basics and semester exam.
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Great ! :-D ... glad to have been of help with clearing exams! Exams can be stressful when they contain topics I cannot find good documentation about ;-)
@mshawn3832
@mshawn3832 3 жыл бұрын
thanks jenkov for all of the videos
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are most welcome :-)
@drj-power9353
@drj-power9353 3 жыл бұрын
what a unique and great way to explain the topics... Thanks a lot Jakob Sir.
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are welcome :-)
@kumararun8337
@kumararun8337 2 жыл бұрын
thank you Jakob, you will always have our gratitude 🙏❤
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thank you! and you are welcome! :-)
@dineshkumarthirugnanam1301
@dineshkumarthirugnanam1301 6 ай бұрын
Nicely explained. Easy to understand. Thanks for the video.
@JakobJenkov
@JakobJenkov 6 ай бұрын
You are welcome !! 😊
@sandeepsingh-de4fg
@sandeepsingh-de4fg 2 жыл бұрын
Very nice Jakob. Well explained.
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thank you :-)
@ripusudan100
@ripusudan100 2 жыл бұрын
i follows you since starting of my carrier, you are awesome!!!
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thank you very much :-) ... how many years is that then?
@jasper5016
@jasper5016 Жыл бұрын
You are amazing. This content is Gold. Thanks so much
@JakobJenkov
@JakobJenkov Жыл бұрын
Thanks a lot :-)
@azimmalpekar9072
@azimmalpekar9072 2 жыл бұрын
Very good explanation and presentation of Concept, Good coverage too with Sample code.
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thank you! :-)
@luckybard2163
@luckybard2163 3 жыл бұрын
Love your work!
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Thank you very much! :-)
@mdsuhaib.s.a
@mdsuhaib.s.a Жыл бұрын
Keep up the great work man
@JakobJenkov
@JakobJenkov Жыл бұрын
Thanks, I will try 😊
@jinseonghwang3146
@jinseonghwang3146 3 жыл бұрын
I have read your text tutorials to study java concurrency. It's very awesome. Thank you very much :) Do you have any plans to publish a book with your tutorials? It deserves it.
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are welcome! .... no, I don't have any plans to publish a book about Java Concurrency at this point in time. I did once think about it, but the underlying details of how the JVM works, and the built-in concurrency constructs keep changing, so to keep up with them it is easier to just make blog posts and videos. Also, I am myself learning more and more about concurrency continuously - so when would I "know enough" to write the book? :-)
@singhvertika8167
@singhvertika8167 3 жыл бұрын
Amazing ..thank you
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are very welcome! :-)
@sajjadvalaei2535
@sajjadvalaei2535 2 жыл бұрын
thank you so much. you are the best.
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thanks :-)
@bunthaideng2492
@bunthaideng2492 6 ай бұрын
Jakob is the best
@JakobJenkov
@JakobJenkov 5 ай бұрын
Thank you :-D
@OmprakashYadavIIT
@OmprakashYadavIIT 3 жыл бұрын
simply awesome
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Thanks you! :-)
@sonalgupta7083
@sonalgupta7083 9 ай бұрын
Good tutorial. I have observed that you have created sleep method separately in your videos, can you please let us know the reason behind that?
@JakobJenkov
@JakobJenkov 9 ай бұрын
I created the sleep() methods just to have the code example using it be a bit shorter. That is all 😊
@baibula
@baibula 5 ай бұрын
Cool!
@JakobJenkov
@JakobJenkov 5 ай бұрын
Thanks !! 😊
@ahmedifhaam7266
@ahmedifhaam7266 2 жыл бұрын
for contains() method, what does it mean that it does-not have to be the same instance. Is the object is of the same class it will return true?
@JakobJenkov
@JakobJenkov 2 жыл бұрын
contains() uses the hashcode() and equals() methods of the Object class (which can be overridden in subclasss) to determine if two objects are "the same". Thus, even if two objects are actually different objects inside the memory of the Java VM, if they are "equal" according to the semantics of the hashcode() and equals() methods, then contains() will return true.
@theyoussefnassar
@theyoussefnassar 2 жыл бұрын
thanks
@JakobJenkov
@JakobJenkov 2 жыл бұрын
You are welcome :-)
@DavisTibbz
@DavisTibbz Жыл бұрын
So equivalent to go channels, right?
@JakobJenkov
@JakobJenkov Жыл бұрын
I don't really know, actually, as I don't know much of Go.
@AlmostDead
@AlmostDead 3 жыл бұрын
Hello there sir, My name is Alex and I've came across your youtube video while searching for information about a problem I have in school, and it is about multithreading in Java. Do you think you could help me out with this, please? It is a producer/consumer problem with 10 threads. It would be very very appreciated if you sir could help me out. Thank you, Alex
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Hi... I probably won't have time - but you can try asking me here in a comment. Then I can see if I can answer it. But I cannot make any promises!
@AlmostDead
@AlmostDead 3 жыл бұрын
@@JakobJenkov It's alright, meanwhile, i solved it:). Thank you anyways!
@mrrishiraj88
@mrrishiraj88 10 ай бұрын
Good day greetings
@JakobJenkov
@JakobJenkov 8 ай бұрын
Thank you - you too !
Producer Consumer Pattern - With Java Example
19:50
Jakob Jenkov
Рет қаралды 26 М.
Java Lock
28:51
Jakob Jenkov
Рет қаралды 43 М.
Did you believe it was real? #tiktok
00:25
Анастасия Тарасова
Рет қаралды 43 МЛН
He sees meat everywhere 😄🥩
00:11
AngLova
Рет қаралды 11 МЛН
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 18 МЛН
Tom & Jerry !! 😂😂
00:59
Tibo InShape
Рет қаралды 64 МЛН
The Java Memory Model - The Basics
23:41
Jakob Jenkov
Рет қаралды 120 М.
#28 - What is PriorityQueue in Java with Examples (using Comparator)
15:38
Naveen AutomationLabs
Рет қаралды 16 М.
Introduction to Java Semaphores - Java Programming
15:23
Will Tollefson
Рет қаралды 6 М.
The Awesome New Queue of .NET 6 That You Skipped
11:52
Nick Chapsas
Рет қаралды 49 М.
Compare and Swap in Java
24:21
Jakob Jenkov
Рет қаралды 15 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 152 М.
Deadlock Prevention in Java
17:49
Jakob Jenkov
Рет қаралды 14 М.
Java Interface Tutorial
14:49
Keep On Coding
Рет қаралды 130 М.
Что не так с яблоком Apple? #apple #macbook
0:38
Не шарю!
Рет қаралды 485 М.