Chapter 2. Embedded caches

Add Data Grid as a dependency to your Java project and use embedded caches that increase application performance and give you capabilities to handle complex use cases.

2.1. Embedded cache tutorials

You can run embedded cache tutorials directly in your IDE or from the command line as follows:

$ mvn -s /path/to/maven-settings.xml clean package exec:exec
Tutorial linkDescription

Distributed caches

Demonstrates how Distributed Caches work.

Replicated caches

Demonstrates how Replicated Caches work.

Invalidated caches

Demonstrates how Invalidated Caches work.


Demonstrates how transactions work.


Demonstrates how Distributed Streams work.

JCache integration

Demonstrates how JCache works.

Functional Maps

Demonstrates how Functional Map API works.


Demonstrates how the Map API works with Data Grid caches.


Demonstrates how to use Multimap.


Uses Data Grid Query to perform full-text queries on cache values.

Clustered Listeners

Detects when data changes in an embedded cache with Clustered Listeners.


Demonstrates how to use an embedded Clustered Counter.

Clustered Locks

Demonstrates how to use an embedded Clustered Lock.

Clustered execution

Demonstrates how to use an embedded Clustered Counter.

Data Grid documentation

You can find more resources about embedded caches in our documentation at: