Examples of RedisSystemException


Examples of org.springframework.data.keyvalue.redis.RedisSystemException

    Properties info = new Properties();
    StringReader stringReader = new StringReader(string);
    try {
      info.load(stringReader);
    } catch (Exception ex) {
      throw new RedisSystemException("Cannot read Redis info", ex);
    } finally {
      stringReader.close();
    }
    return info;
  }
View Full Code Here

Examples of org.springframework.data.keyvalue.redis.RedisSystemException

  public static DataAccessException convertRjcAccessException(RuntimeException ex) {
    if (ex instanceof RedisException) {
      return convertRjcAccessException((RedisException) ex);
    }

    return new RedisSystemException("Unknown exception", ex);
  }
View Full Code Here

Examples of org.springframework.data.keyvalue.redis.RedisSystemException

  public static DataAccessException convertJedisAccessException(RuntimeException ex) {
    if (ex instanceof JedisException) {
      return convertJedisAccessException((JedisException) ex);
    }

    return new RedisSystemException("Unknown exception", ex);
  }
View Full Code Here

Examples of org.springframework.data.keyvalue.redis.RedisSystemException

    Properties info = new Properties();
    StringReader stringReader = new StringReader(string);
    try {
      info.load(stringReader);
    } catch (Exception ex) {
      throw new RedisSystemException("Cannot read Redis info", ex);
    } finally {
      stringReader.close();
    }
    return info;
  }
View Full Code Here

Examples of org.springframework.data.redis.RedisSystemException

  static final RedisCodec<byte[], byte[]> CODEC = new BytesRedisCodec();

  static DataAccessException convertRedisAccessException(RuntimeException ex) {
    if (ex instanceof RedisCommandInterruptedException) {
      return new RedisSystemException("Redis command interrupted", ex);
    }
    if (ex instanceof RedisException) {
      return new RedisSystemException("Redis exception", ex);
    }
    return null;
  }
View Full Code Here

Examples of org.springframework.data.redis.RedisSystemException

    Properties info = new Properties();
    StringReader stringReader = new StringReader(reply);
    try {
      info.load(stringReader);
    } catch (Exception ex) {
      throw new RedisSystemException("Cannot read Redis info", ex);
    } finally {
      stringReader.close();
    }
    return info;
  }
View Full Code Here

Examples of org.springframework.data.redis.RedisSystemException

    if (ex instanceof DataAccessException) {
      return (DataAccessException) ex;
    }

    if (ex instanceof RedisCommandInterruptedException) {
      return new RedisSystemException("Redis command interrupted", ex);
    }

    if (ex instanceof RedisException) {
      return new RedisSystemException("Redis exception", ex);
    }

    if (ex instanceof ChannelException) {
      return new RedisConnectionFailureException("Redis connection failed", ex);
    }
View Full Code Here

Examples of org.springframework.data.redis.RedisSystemException

   */
  @Test
  public void excuteShouldUseEvalInCaseNoSha1PresentForGivenScript() {

    when(redisConnectionMock.evalSha(anyString(), any(ReturnType.class), anyInt())).thenThrow(
        new RedisSystemException("NOSCRIPT No matching script. Please use EVAL.", new Exception()));

    executor.execute(SCRIPT, null);

    verify(redisConnectionMock, times(1)).eval(any(byte[].class), any(ReturnType.class), anyInt());
  }
View Full Code Here

Examples of org.springframework.data.redis.RedisSystemException

   */
  @Test(expected = RedisSystemException.class)
  public void excuteShouldThrowExceptionInCaseEvalShaFailsWithAlthoughTheScriptExists() {

    when(redisConnectionMock.evalSha(anyString(), any(ReturnType.class), anyInt())).thenThrow(
        new RedisSystemException("Found Script but could not execute it.", new Exception()));

    executor.execute(SCRIPT, null);
  }
View Full Code Here

Examples of org.springframework.data.redis.RedisSystemException

    try {
      result = connection.evalSha(script.getSha1(), returnType, numKeys, keysAndArgs);
    } catch (Exception e) {

      if (!expectionContainsNoScriptError(e)) {
        throw e instanceof RuntimeException ? (RuntimeException) e : new RedisSystemException(e.getMessage(), e);
      }

      result = connection.eval(scriptBytes(script), returnType, numKeys, keysAndArgs);
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.