|
|
|
@ -15,31 +15,69 @@
|
|
|
|
|
*/
|
|
|
|
|
package io.quarkus.redisson.client.runtime;
|
|
|
|
|
|
|
|
|
|
import io.quarkus.runtime.annotations.ConfigItem;
|
|
|
|
|
import io.quarkus.runtime.annotations.ConfigPhase;
|
|
|
|
|
import io.quarkus.runtime.annotations.ConfigRoot;
|
|
|
|
|
import io.smallrye.config.ConfigMapping;
|
|
|
|
|
import io.smallrye.config.WithName;
|
|
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Redisson config
|
|
|
|
|
*
|
|
|
|
|
* @author Nikita Koksharov
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
//@ConfigRoot(name = "redisson", phase = ConfigPhase.RUN_TIME)
|
|
|
|
|
public class RedissonConfig {
|
|
|
|
|
@ConfigRoot(phase = ConfigPhase.RUN_TIME)
|
|
|
|
|
@ConfigMapping(prefix = "quarkus")
|
|
|
|
|
public interface RedissonConfig {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Redis uri
|
|
|
|
|
* Common params
|
|
|
|
|
*
|
|
|
|
|
* @return params
|
|
|
|
|
*/
|
|
|
|
|
// @ConfigItem
|
|
|
|
|
public Optional<String> codec;
|
|
|
|
|
@WithName("redisson")
|
|
|
|
|
Map<String, String> params();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Redis cluster config
|
|
|
|
|
* Single server params
|
|
|
|
|
*
|
|
|
|
|
* @return params
|
|
|
|
|
*/
|
|
|
|
|
// @ConfigItem
|
|
|
|
|
public Optional<Map<String, String>> clusterServersConfig;
|
|
|
|
|
@WithName("redisson.single-server-config")
|
|
|
|
|
Map<String, String> singleServerConfig();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Cluster servers params
|
|
|
|
|
*
|
|
|
|
|
* @return params
|
|
|
|
|
*/
|
|
|
|
|
@WithName("redisson.cluster-servers-config")
|
|
|
|
|
Map<String, String> clusterServersConfig();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sentinel servers params
|
|
|
|
|
*
|
|
|
|
|
* @return params
|
|
|
|
|
*/
|
|
|
|
|
@WithName("redisson.sentinel-servers-config")
|
|
|
|
|
Map<String, String> sentinelServersConfig();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Replicated servers params
|
|
|
|
|
*
|
|
|
|
|
* @return params
|
|
|
|
|
*/
|
|
|
|
|
@WithName("redisson.replicated-servers-config")
|
|
|
|
|
Map<String, String> replicatedServersConfig();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Master and slave servers params
|
|
|
|
|
*
|
|
|
|
|
* @return params
|
|
|
|
|
*/
|
|
|
|
|
@WithName("redisson.master-slave-servers-config")
|
|
|
|
|
Map<String, String> masterSlaveServersConfig();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|