@@ -441,7 +441,7 @@ public Long pTtl(byte[] key) {
441441
442442 return connection .getClusterCommandExecutor ()
443443 .executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .pttl (key ),
444- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
444+ connection .clusterGetNodeForKey (key ))
445445 .getValue ();
446446 }
447447
@@ -457,7 +457,7 @@ public Long pTtl(byte[] key, TimeUnit timeUnit) {
457457 return connection .getClusterCommandExecutor ()
458458 .executeCommandOnSingleNode (
459459 (JedisClusterCommandCallback <Long >) client -> Converters .millisecondsToTimeUnit (client .pttl (key ), timeUnit ),
460- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
460+ connection .clusterGetNodeForKey (key ))
461461 .getValue ();
462462 }
463463
@@ -472,7 +472,7 @@ public byte[] dump(byte[] key) {
472472
473473 return connection .getClusterCommandExecutor ()
474474 .executeCommandOnSingleNode ((JedisClusterCommandCallback <byte []>) client -> client .dump (key ),
475- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
475+ connection .clusterGetNodeForKey (key ))
476476 .getValue ();
477477 }
478478
@@ -499,7 +499,7 @@ public void restore(byte[] key, long ttlInMillis, byte[] serializedValue, boolea
499499 return JedisConverters .toString (this .connection .execute ("RESTORE" , key ,
500500 Arrays .asList (JedisConverters .toBytes (ttlInMillis ), serializedValue , JedisConverters .toBytes ("REPLACE" ))));
501501
502- }, connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ));
502+ }, connection .clusterGetNodeForKey (key ));
503503 }
504504
505505 /*
@@ -582,7 +582,7 @@ public ValueEncoding encodingOf(byte[] key) {
582582
583583 return connection .getClusterCommandExecutor ()
584584 .executeCommandOnSingleNode ((JedisClusterCommandCallback <byte []>) client -> client .objectEncoding (key ),
585- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
585+ connection .clusterGetNodeForKey (key ))
586586 .mapValue (JedisConverters ::toEncoding );
587587 }
588588
@@ -598,7 +598,7 @@ public Duration idletime(byte[] key) {
598598
599599 return connection .getClusterCommandExecutor ()
600600 .executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .objectIdletime (key ),
601- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
601+ connection .clusterGetNodeForKey (key ))
602602 .mapValue (Converters ::secondsToDuration );
603603 }
604604
@@ -614,7 +614,7 @@ public Long refcount(byte[] key) {
614614
615615 return connection .getClusterCommandExecutor ()
616616 .executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .objectRefcount (key ),
617- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
617+ connection .clusterGetNodeForKey (key ))
618618 .getValue ();
619619
620620 }
0 commit comments