Skip to content

mastery001/codis-spring-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codis/RebornDB Introduction

##Features

  • Support Reborn-java client
  • Support Spring-data-redis connection

##How to use

  1. see Reborn-java
  2. spring-data-redis xml config
	<bean id="xxx" class="com.le.smartconnect.adapter.spring.RebornConnectionFactory">
		<constructor-arg name="rebornJedisPool" ref="rebornPool" />
	</bean>
	
	<bean id="rebornPool" class="org.reborndb.reborn.RoundRobinJedisPool" >
		<constructor-arg name="zkAddr" value="${redis.zk.con}" />
		<constructor-arg name="zkSessionTimeoutMs" value="${redis.zk.timeout}" />
		<constructor-arg name="zkPath" value="${redis.zk.path}" />
		<constructor-arg name="poolConfig" ref="jedisPoolConfig" />
	</bean>

##Note JDK7 is required to build and use reborn-java. If you want to use reborn-java with JDK6, you can copy the source files to your project, replace ThreadLocalRandom in BoundedExponentialBackoffRetryUntilElapsed and JDK7 specified grammar(maybe, not sure), and then compile with JDK6.

About

codis或reborn的java客户端,适配spring-data-redis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages