@@ -455,7 +455,7 @@ public Long pTtl(byte[] key) {
455455
456456 return connection .getClusterCommandExecutor ()
457457 .executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .pttl (key ),
458- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
458+ connection .clusterGetNodeForKey (key ))
459459 .getValue ();
460460 }
461461
@@ -471,7 +471,7 @@ public Long pTtl(byte[] key, TimeUnit timeUnit) {
471471 return connection .getClusterCommandExecutor ()
472472 .executeCommandOnSingleNode (
473473 (JedisClusterCommandCallback <Long >) client -> Converters .millisecondsToTimeUnit (client .pttl (key ), timeUnit ),
474- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
474+ connection .clusterGetNodeForKey (key ))
475475 .getValue ();
476476 }
477477
@@ -486,7 +486,7 @@ public byte[] dump(byte[] key) {
486486
487487 return connection .getClusterCommandExecutor ()
488488 .executeCommandOnSingleNode ((JedisClusterCommandCallback <byte []>) client -> client .dump (key ),
489- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
489+ connection .clusterGetNodeForKey (key ))
490490 .getValue ();
491491 }
492492
@@ -513,7 +513,7 @@ public void restore(byte[] key, long ttlInMillis, byte[] serializedValue, boolea
513513 return JedisConverters .toString (this .connection .execute ("RESTORE" , key ,
514514 Arrays .asList (JedisConverters .toBytes (ttlInMillis ), serializedValue , JedisConverters .toBytes ("REPLACE" ))));
515515
516- }, connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ));
516+ }, connection .clusterGetNodeForKey (key ));
517517 }
518518
519519 /*
@@ -596,7 +596,7 @@ public ValueEncoding encodingOf(byte[] key) {
596596
597597 return connection .getClusterCommandExecutor ()
598598 .executeCommandOnSingleNode ((JedisClusterCommandCallback <byte []>) client -> client .objectEncoding (key ),
599- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
599+ connection .clusterGetNodeForKey (key ))
600600 .mapValue (JedisConverters ::toEncoding );
601601 }
602602
@@ -612,7 +612,7 @@ public Duration idletime(byte[] key) {
612612
613613 return connection .getClusterCommandExecutor ()
614614 .executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .objectIdletime (key ),
615- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
615+ connection .clusterGetNodeForKey (key ))
616616 .mapValue (Converters ::secondsToDuration );
617617 }
618618
@@ -628,7 +628,7 @@ public Long refcount(byte[] key) {
628628
629629 return connection .getClusterCommandExecutor ()
630630 .executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .objectRefcount (key ),
631- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
631+ connection .clusterGetNodeForKey (key ))
632632 .getValue ();
633633
634634 }
0 commit comments