added warm up process to improve usage performance

pull/605/head
jackygurui 9 years ago
parent 51c5b6546f
commit ec0e5916fb

@ -74,6 +74,7 @@ import org.redisson.liveobject.provider.ResolverProvider;
import org.redisson.pubsub.SemaphorePubSub;
import io.netty.util.internal.PlatformDependent;
import org.redisson.misc.RedissonObjectFactory;
/**
* Main infrastructure class allows to get access
@ -84,6 +85,11 @@ import io.netty.util.internal.PlatformDependent;
*/
public class Redisson implements RedissonClient {
static {
RedissonObjectFactory.warmUp();
RedissonReference.warmUp();
}
protected final EvictionScheduler evictionScheduler;
protected final CommandExecutor commandExecutor;
protected final ConnectionManager connectionManager;

@ -62,6 +62,8 @@ public class RedissonReference {
reactiveMap.makeImmutable();
}
public static void warmUp() {}
private String type;
private String keyName;
private String codec;

@ -216,4 +216,6 @@ public class RedissonObjectFactory {
}
throw new ClassNotFoundException("No RObject is found to match class type of " + (expectedType != null ? expectedType.getName() : "null") + " with codec type of " + (codec != null ? codec.getClass().getName() : "null"));
}
public static void warmUp() {}
}

Loading…
Cancel
Save