All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redis.clients.jedis.exceptions.JedisBroadcastException Maven / Gradle / Ivy

There is a newer version: 5.2.0
Show newest version
package redis.clients.jedis.exceptions;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import redis.clients.jedis.HostAndPort;

/**
 * Note: This exception extends {@link JedisDataException} just so existing applications catching
 * JedisDataException do not get broken.
 */
// TODO: extends JedisException
public class JedisBroadcastException extends JedisDataException {

  private static final String BROADCAST_ERROR_MESSAGE = "A failure occurred while broadcasting the command.";

  private final Map replies = new HashMap<>();

  public JedisBroadcastException() {
    super(BROADCAST_ERROR_MESSAGE);
  }

  public void addReply(HostAndPort node, Object reply) {
    replies.put(node, reply);
  }

  public Map getReplies() {
    return Collections.unmodifiableMap(replies);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy