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:latestBefore running anything, build and install the project. This ensures that all required modules are available in your local Maven repository:
./mvnw clean installThis project is a Spring Boot app that connects to a remote cache and loads sample data.
- Cache name:
default - Data type:
Integerkey /Contributorvalue - Each
Contributorhas:int codeString name
To run the writer module:
./mvnw spring-boot:run -pl writerThe reader project includes several submodules for different near caching setups.
- Shared code used by all reader modules.
- Randomly calls
getin a loop of 10,000 iterations to retrieveContributorobjects. - No
mainmethod (not directly runnable).
Run this to test without near caching:
./mvnw spring-boot:run -pl reader/reader-no-near-cacheNear caching is enabled directly in the code:
./mvnw spring-boot:run -pl reader/reader-near-codeNear caching is configured in application.properties:
./mvnw spring-boot:run -pl reader/reader-near-springThis project uses the Infinispan Spring Boot Starter.