44import redis .clients .jedis .JedisCluster ;
55import redis .clients .jedis .JedisPoolConfig ;
66import redis .clients .jedis .Protocol ;
7- import redis .clients .jedis .exceptions .JedisClusterMaxRedirectionsException ;
87import redis .clients .jedis .exceptions .JedisConnectionException ;
8+ import redis .clients .jedis .exceptions .JedisRedirectionException ;
99
1010import java .util .Set ;
1111
@@ -37,7 +37,7 @@ public byte[] set(String key, byte[] value) {
3737 try {
3838 retVal = this .cluster .set (key .getBytes (), value );
3939 retry = false ;
40- } catch (JedisClusterMaxRedirectionsException | JedisConnectionException ex ) {
40+ } catch (JedisRedirectionException | JedisConnectionException ex ) {
4141 handleException (tries , ex );
4242 }
4343 } while (retry && tries <= NUM_RETRIES );
@@ -55,7 +55,7 @@ public Long setnx(String key, byte[] value) {
5555 try {
5656 retVal = this .cluster .setnx (key .getBytes (), value );
5757 retry = false ;
58- } catch (JedisClusterMaxRedirectionsException | JedisConnectionException ex ) {
58+ } catch (JedisRedirectionException | JedisConnectionException ex ) {
5959 handleException (tries , ex );
6060 }
6161 } while (retry && tries <= NUM_RETRIES );
@@ -73,7 +73,7 @@ public Long expire(String key, int seconds) {
7373 try {
7474 retVal = this .cluster .expire (key , seconds );
7575 retry = false ;
76- } catch (JedisClusterMaxRedirectionsException | JedisConnectionException ex ) {
76+ } catch (JedisRedirectionException | JedisConnectionException ex ) {
7777 handleException (tries , ex );
7878 }
7979 } while (retry && tries <= NUM_RETRIES );
@@ -91,7 +91,7 @@ public byte[] get(String key) {
9191 try {
9292 retVal = this .cluster .get (key .getBytes ());
9393 retry = false ;
94- } catch (JedisClusterMaxRedirectionsException | JedisConnectionException ex ) {
94+ } catch (JedisRedirectionException | JedisConnectionException ex ) {
9595 handleException (tries , ex );
9696 }
9797 } while (retry && tries <= NUM_RETRIES );
@@ -109,7 +109,7 @@ public Long delete(String key) {
109109 try {
110110 retVal = this .cluster .del (key );
111111 retry = false ;
112- } catch (JedisClusterMaxRedirectionsException | JedisConnectionException ex ) {
112+ } catch (JedisRedirectionException | JedisConnectionException ex ) {
113113 handleException (tries , ex );
114114 }
115115 } while (retry && tries <= NUM_RETRIES );
0 commit comments