[id='persistence_spi']
:context: spi
= {brandname} Persistence SPIs
{brandname} Service Provider Interfaces (SPI) enable read and write operations
to external storage and provide the following features:

Portability across JCache-compliant vendors::
The {brandname} `CacheWriter` and `CacheLoader` interfaces align with the
`JSR-107` JCache specification.

Simplified transaction integration::
{brandname} automatically handles locking so your implementations do not need
to coordinate concurrent access to persistent stores. Depending on the locking
mode you use, concurrent writes to the same key generally do not occur.
However, you should expect operations on the persistent storage to originate
from multiple threads and create implementations to tolerate this behavior.

Parallel iteration::
{brandname} lets you iterate over entries in persistent stores with multiple
threads in parallel.

Reduced serialization resulting in less CPU usage::
{brandname} exposes stored entries in a serialized format that can be
transmitted remotely. For this reason, {brandname} does not need to deserialize
entries that it retrieves from persistent storage and then serialize again when
writing to the wire.

.Reference

* link:http://jcp.org/en/jsr/detail?id=107[JSR-107]
* link:{javadocroot}/org/infinispan/persistence/spi/CacheWriter.html[CacheWriter]
* link:{javadocroot}/org/infinispan/persistence/spi/CacheLoader.html[CacheLoader]


include::{topics}/ref_persistence_spi.adoc[leveloffset=+1]

// Restore the parent context.
ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
