ConcurrencyJavaSERelevant topics

Concurrent Collections

by:

Besides concurrent collections, Concurrency API also includes methods for obtaining synchronized versions of existing non-concurrent collection objects. These methods, defined in Collections class, contain synchronized methods …

ConcurrencyJavaSERelevant topics

Protecting Data with Atomic Classes

by:

With the release of Concurrency API Java added a new java.util.concurrent.atomic package to help coordinate access to primitive values and object references. As with most classes …

ConcurrencyJavaSERelevant topics

Increasing Concurrency with Pools

by:

The newCachedThreadPool() method will create a thread pool of unbounded size, allocating a new thread anytime one is required or all existing threads are busy. This …

ConcurrencyJavaSERelevant topics

Scheduling tasks using Concurrency API

by:

The last two methods in above table are similar as they both perform the same task repeatedly, after completing some initial delay. The difference is related …

ConcurrencyJavaSERelevant topics

java.util.concurrent.Callable interface

by:

Callable interface is similar to Runnable except that its call() method returns a value and can throw a checked exception, while run() method of Runnable interface …

ConcurrencyJavaSERelevant topics

Submitting Tasks to ExecutorService

by:

Waiting for Results How can developer know when a task submitted to an ExecutorService is complete ? As it was mentioned above, the submit() method returns …

ConcurrencyJavaSERelevant topics

Shutting Down a Thread Executor

by:

One using a thread executor is finished, it is important to call the shutdown() method on an instance of an ExecutorService interface. A thread executor creates …

Design PatternsJavaSERelevant topics

Intercepting Filter Pattern

by:

Intercepting Filter Pattern is used when developer wants to do some pre-processing with request or response of the application. Filters are defined and applied on the …

Design PatternsJavaSERelevant topics

Transfer Object Pattern

by:

Transfer Object Pattern is used when developer wants to pass data with multiple attributes in one shot from client to server. Transfer Object is also known …

Design PatternsJavaSERelevant topics

Front Controller Pattern

by:

Front Controller design pattern is used to provide a centralized request handling mechanism so that all requests will be handled by a single handler. This handler …