From 1a463ff810997f73a0fed07123ad2535ac4227c9 Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Thu, 20 Jan 2011 17:09:29 +0200 Subject: [PATCH] switch message with channel on the low level publish --- .../data/keyvalue/redis/connection/RedisPubSubCommands.java | 4 ++-- .../data/keyvalue/redis/connection/jedis/JedisConnection.java | 2 +- .../keyvalue/redis/connection/jredis/JredisConnection.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/RedisPubSubCommands.java b/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/RedisPubSubCommands.java index 1d99737be..42ec175ff 100644 --- a/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/RedisPubSubCommands.java +++ b/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/RedisPubSubCommands.java @@ -43,11 +43,11 @@ public interface RedisPubSubCommands { /** * Publishes the given message to the given channel. * - * @param message message to publish * @param channel the channel to publish to + * @param message message to publish * @return the number of clients that received the message */ - Long publish(byte[] message, byte[] channel); + Long publish(byte[] channel, byte[] message); /** * Subscribes the connection to the given channels. diff --git a/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/jedis/JedisConnection.java b/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/jedis/JedisConnection.java index 5f1d9cf08..7e0be18eb 100644 --- a/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/jedis/JedisConnection.java +++ b/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/jedis/JedisConnection.java @@ -1609,7 +1609,7 @@ public class JedisConnection implements RedisConnection { // Pub/Sub functionality // @Override - public Long publish(byte[] message, byte[] channel) { + public Long publish(byte[] channel, byte[] message) { try { if (isQueueing()) { throw new UnsupportedOperationException(); diff --git a/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/jredis/JredisConnection.java b/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/jredis/JredisConnection.java index 0ba6b3373..b4487000f 100644 --- a/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/jredis/JredisConnection.java +++ b/spring-data-redis/src/main/java/org/springframework/data/keyvalue/redis/connection/jredis/JredisConnection.java @@ -1058,7 +1058,7 @@ public class JredisConnection implements RedisConnection { } @Override - public Long publish(byte[] message, byte[] channel) { + public Long publish(byte[] channel, byte[] message) { throw new UnsupportedOperationException(); }