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

co.com.bancolombia.binstash.CentralizedCacheFactory Maven / Gradle / Ivy

There is a newer version: 1.2.6
Show newest version
package co.com.bancolombia.binstash;

import co.com.bancolombia.binstash.model.api.MapCache;
import co.com.bancolombia.binstash.model.api.ObjectCache;
import co.com.bancolombia.binstash.model.api.Stash;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class CentralizedCacheFactory {

    private final Stash centralizedStash;
    private final ObjectMapper objectMapper;

    public  ObjectCache newObjectCache() {
        return new SingleTierObjectCacheUseCase<>(this.centralizedStash,
                new SerializatorHelper<>(objectMapper));
    }

    public MapCache newMapCache() {
        return new SingleTierMapCacheUseCase(this.centralizedStash);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy