List/Grid Tag Archives: Concurrency

java-logo

How is ThreadLocal implemented?

This is a follow-up to my last week post, where I explained the motivation behind ThreadLocal usage. From the post we could recall that ThreadLocal is indeed a cool concept if you wish to have an independently initialized copy of ...
java-logo

What are Reentrant Locks?

In Java 5.0 a new addition was made to enhance the intrinsic locking capabilities, called as Reentrant Lock. Prior to this, ‘synchronized’ and ‘volatile’ were the means for achieving concurrency.         ...
java-logo

When and how to use a ThreadLocal

As our readers might already have guessed, I deal with memory leaks on a daily basis. A particular type of the OutOfMemoryError messages has recently started catching my attention – the issues triggered by misused ThreadLocals h ...
java-logo

Non-Blocking Asynchronous Java 8 and Scala’s Try/Success/Failure

Inspired by a recent newsletter from Heinz Kabutz as well as Scala’s Futures which I investigated in my recent book, I set about using Java 8 to write an example of how to submit work to an execution service and respond to i ...
java-logo

Ahoy There Callbacks!

Because it’s my bag, I like JavaScript. In fact, I’ve grown to love JavaScritp’s asynchronous callback oriented style of programming. Consequently, when I find myself in a non-JavaScript environment, say, like Java, I tend t ...
java-logo

Fine-Grained Concurrency with the Guava Striped Class

This post is going to cover how to use the Striped class from Guava to achieve finer-grained concurrency. The ConcurrentHashMap uses a striped locked approach to increase concurrency and the Striped class extends this principal by ...
java-logo

Scalable Counters For Multi Core

Counters are required everywhere , for e.g. to find key KPI of application, load on application, total number of request served, some KPI for finding throughput of application & many more. With all these requirement complexit ...
java-logo

Simple and lightweight pool implementation

Object pools are containers which contain a specified amount of objects. When an object is taken from the pool, it is not available in the pool until it is put back. Objects in the pool have a lifecycle: creation, validation, dest ...
java-logo

5 Things You Didn’t Know About Synchronization in Java and Scala

Practically all server applications require some sort of synchronization between multiple threads. Most of the synchronization work is done for us at the framework level, such as by our web server, DB client or messaging framework ...
java-logo

Java FutureTask Example Program

Sometime back I wrote a post about Java Callable Future interfaces that we can use to get the concurrent processing benefits of threads as well as they are capable of returning value to the calling program. FutureTask is base conc ...
Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.

Sign up for our Newsletter

15,153 insiders are already enjoying weekly updates and complimentary whitepapers! Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

As an extra bonus, by joining you will get our brand new e-books, published by Java Code Geeks and their JCG partners for your reading pleasure! Enter your info and stay on top of things,

  • Fresh trends
  • Cases and examples
  • Research and insights
  • Two complimentary e-books
Get tutored by the Geeks! JCG Academy is a fact... Join Now
Hello. Add your message here.