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

org.redkalex.cache.redis.RedisVertxCacheSourceProvider Maven / Gradle / Ivy

There is a newer version: 2.7.7
Show newest version
/*
 */
package org.redkalex.cache.redis;

import org.redkale.annotation.Priority;
import org.redkale.source.*;
import org.redkale.source.spi.CacheSourceProvider;
import org.redkale.util.AnyValue;

/** @author zhangjx */
@Priority(-300)
public class RedisVertxCacheSourceProvider implements CacheSourceProvider {

    @Override
    public boolean acceptsConf(AnyValue config) {
        try {
            Object.class.isAssignableFrom(io.vertx.redis.client.RedisOptions.class); // 试图加载vertx-redis相关类
            return new RedisVertxCacheSource().acceptsConf(config);
        } catch (Throwable e) {
            return false;
        }
    }

    @Override
    public CacheSource createInstance() {
        return new RedisVertxCacheSource();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy