io.github.anicolaspp.Hx.commands.CacheCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of HxFactory Show documentation
Show all versions of HxFactory Show documentation
Factory library to create and run Hystrix commands with simplicity
package io.github.anicolaspp.Hx.commands;
import io.github.anicolaspp.Hx.BreakerSupplier;
import io.github.anicolaspp.Hx.RequestContextInitializer;
class CacheCommand extends SingleCommand implements RequestContextInitializer {
private final String key;
CacheCommand(String key, BreakerSupplier supplier, Setter setter) {
super(supplier, setter);
this.key = key;
initializeRequestContext();
}
@Override
protected String getCacheKey() {
return key;
}
}