Run the Infinispan server using Docker or Podman:
docker run -it -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan/server:latest
podman run -it -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan/server:latest
Before running anything, build and install the project. This ensures that all required modules are available in your local Maven repository:
./mvnw clean install
This project is a Spring Boot app that connects to a remote cache and loads sample data.
- Cache name:
default
- Data type:
Integer
key /Contributor
value - Each
Contributor
has:int code
String name
To run the writer module:
./mvnw spring-boot:run -pl writer
The reader project includes several submodules for different near caching setups.
- Shared code used by all reader modules.
- Randomly calls
get
in a loop of 10,000 iterations to retrieveContributor
objects. - No
main
method (not directly runnable).
Run this to test without near caching:
./mvnw spring-boot:run -pl reader/reader-no-near-cache
Near caching is enabled directly in the code:
./mvnw spring-boot:run -pl reader/reader-near-code
Near caching is configured in application.properties
:
./mvnw spring-boot:run -pl reader/reader-near-spring
This project uses the Infinispan Spring Boot Starter.