All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.buschmais.xo.impl.cache.CacheSynchronization Maven / Gradle / Ivy

The newest version!
package com.buschmais.xo.impl.cache;

import com.buschmais.xo.api.XOTransaction;

public class CacheSynchronization implements XOTransaction.Synchronization {

    private final CacheSynchronizationService cacheSynchronizationService;

    public CacheSynchronization(CacheSynchronizationService cacheSynchronizationService) {
        this.cacheSynchronizationService = cacheSynchronizationService;
    }

    @Override
    public void beforeCompletion() {
        cacheSynchronizationService.flush();
    }

    @Override
    public void afterCompletion(boolean committed) {
        cacheSynchronizationService.clear();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy