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

io.rtr.alchemy.example.config.PeriodicStaleCheckingCacheStrategy Maven / Gradle / Ivy

There is a newer version: 2.2.14
Show newest version
package io.rtr.alchemy.example.config;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.rtr.alchemy.caching.CacheStrategy;
import io.rtr.alchemy.service.config.CacheStrategyConfiguration;

import org.joda.time.Duration;

import javax.validation.constraints.NotNull;

public class PeriodicStaleCheckingCacheStrategy extends CacheStrategyConfiguration {
    @NotNull @JsonProperty private Duration duration;

    public Duration getDuration() {
        return duration;
    }

    @Override
    public CacheStrategy createStrategy() {
        return new io.rtr.alchemy.caching.PeriodicStaleCheckingCacheStrategy(duration);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy