저는 Spring에서 웹 어플리케이션을 작성하고 Jedis에서 Spring Data Redis를 사용하고 있습니다. "설정 명령이 많은 레디 스 클러스터에 웹 응용 프로그램 회담 I 파이프 라인의 레디 스 클러스터에 명령을 보내고 싶어요 내가 예외 가지고 있다고했을 때 :.JedisCluster가있는 파이프 라인이 지원되지 않습니다.
java.lang의를. UnsupportedOperationException가이 : 파이프 라인은 현재 JedisClusterConnection 지원되지 입니다
내 대안이 될 것입니다 무엇
EDIT1 :.?
protected void store(Map<String,Creative> creativesToStore, Function<Map<String,Creative>,Object> executedAction)
{
this.redisTemplate.execute(
redisConnection -> executedAction.apply(creativesToStore), true, true); // Pipelined execution*/
}
protected Object storeAllCreativesRedis(Map<String,Creative> creativesToStore)
{
creativesToStore.keySet()
.stream()
.filter(key -> creativesToStore.get(key)!=null)
.forEach(key -> {
redisTemplate.opsForValue().set(key, creativesToStore.get(key), ttlSeconds, timeUnit);
logger.debug("Issuing a redis set for %s ",key);
});
return null;
}
,536,
예외가 아니라 코드를 공유 하시겠습니까? – alzee
키가있는 노드에 연결하여 파이프 라이닝을 직접 사용할 수 있습니다. – mp911de
클러스터의 개별 노드에 연결하는 방법의 예를 보여줄 수 있습니까? –