Skip to content

v1.2.0

Latest
Compare
Choose a tag to compare
@MeninaChimp MeninaChimp released this 23 Jul 15:20
  • Support complex operation, support user-defined serialize, balance

extend

for complex operation, like set a Business Object, you can implement by following the way below:

redisClient.extend().set(key, BO);

user-defined

so far, the default serializer is JacksonSerializer, the default strategy for load balancing is RoundRobinBalance, but you can change them.

if you want to use JDK Serializer, you can follow the way below:

	@Bean
	public Serializer jdkSerializer(){
		return new JdkSerializer();
	}

maybe you want to extend the implemention for serializer, the redis-adapter support you do this. you can extends SerializerAdapter and implement the abstract method doSerialize/doDeserialize, now, you inject your implemention to spring container, the redis-adapter will use your implemention to serialize business object.

if you do not want to use RoundRobinBalance, there is another implemention for LB:

	@Bean
	public Balance IpHashBalance(){
		return new IpHashBalance();
	}

more implements for LB will provide soon, and you can also extend implemention for LB by youself. like extend the implemention for serializer.