Class AsyncCacheWriter

  • All Implemented Interfaces:
    Lifecycle, CacheWriter
    Direct Known Subclasses:

    public class AsyncCacheWriter
    extends DelegatingCacheWriter
    The AsyncCacheWriter is a delegating CacheStore that buffers changes and writes them asynchronously to the underlying CacheStore.

    Read operations are done synchronously, taking into account the current state of buffered changes.

    There is no provision for exception handling for problems encountered with the underlying store during a write operation, and the exception is just logged.

    When configuring the loader, use the following element:

    <async enabled="true" />

    to define whether cache loader operations are to be asynchronous. If not specified, a cache loader operation is assumed synchronous and this decorator is not applied.

    Write operations affecting same key are now coalesced so that only the final state is actually stored.

    Manik Surtani, Galder ZamarreƱo, Sanne Grinovero, Karsten Blees, Mircea Markus