Package redis.clients.jedis.exceptions

Examples of redis.clients.jedis.exceptions.JedisConnectionException


    } else {
        sb.append((char) b);
    }
      }
  } catch (IOException e) {
      throw new JedisConnectionException(e);
  }
  String reply = sb.toString();
  if (reply.length() == 0) {
      throw new JedisConnectionException(
        "It seems like server has closed the connection.");
  }
  return reply;
    }
View Full Code Here


    public T getResource() {
  try {
      return internalPool.borrowObject();
  } catch (Exception e) {
      throw new JedisConnectionException(
        "Could not get a resource from the pool", e);
  }
    }
View Full Code Here

    public abstract void onPSubscribe(String pattern, int subscribedChannels);

    public void unsubscribe() {
  if (client == null) {
      throw new JedisConnectionException(
        "JedisPubSub was not subscribed to a Jedis instance.");
  }
  client.unsubscribe();
  client.flush();
    }
View Full Code Here

  client.flush();
    }

    public void unsubscribe(String... channels) {
  if (client == null) {
      throw new JedisConnectionException(
        "JedisPubSub is not subscribed to a Jedis instance.");
  }
  client.unsubscribe(channels);
  client.flush();
    }
View Full Code Here

  client.flush();
    }

    public void subscribe(String... channels) {
  if (client == null) {
      throw new JedisConnectionException(
        "JedisPubSub is not subscribed to a Jedis instance.");
  }
  client.subscribe(channels);
  client.flush();
    }
View Full Code Here

  client.flush();
    }

    public void psubscribe(String... patterns) {
  if (client == null) {
      throw new JedisConnectionException(
        "JedisPubSub is not subscribed to a Jedis instance.");
  }
  client.psubscribe(patterns);
  client.flush();
    }
View Full Code Here

  client.flush();
    }

    public void punsubscribe() {
  if (client == null) {
      throw new JedisConnectionException(
        "JedisPubSub is not subscribed to a Jedis instance.");
  }
  client.punsubscribe();
  client.flush();
    }
View Full Code Here

  client.flush();
    }

    public void punsubscribe(String... patterns) {
  if (client == null) {
      throw new JedisConnectionException(
        "JedisPubSub is not subscribed to a Jedis instance.");
  }
  client.punsubscribe(patterns);
  client.flush();
    }
View Full Code Here

public class TestDefaultExceptionHandler {

    @Test
    public void testOnException_ConnectionEx() {
        Assert.assertEquals(RecoveryStrategy.RECONNECT,
            new DefaultExceptionHandler().onException(null, new JedisConnectionException("foo"), null));
    }
View Full Code Here

    public abstract void onPSubscribe(String pattern, int subscribedChannels);

    public void unsubscribe() {
        if (client == null) {
            throw new JedisConnectionException(
                    "JedisPubSub was not subscribed to a Jedis instance.");
        }
        client.unsubscribe();
        client.flush();
    }
View Full Code Here

TOP

Related Classes of redis.clients.jedis.exceptions.JedisConnectionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.