@@ -441,7 +441,7 @@ public Long pTtl(byte[] key) {
441
441
442
442
return connection .getClusterCommandExecutor ()
443
443
.executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .pttl (key ),
444
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
444
+ connection .clusterGetNodeForKey (key ))
445
445
.getValue ();
446
446
}
447
447
@@ -457,7 +457,7 @@ public Long pTtl(byte[] key, TimeUnit timeUnit) {
457
457
return connection .getClusterCommandExecutor ()
458
458
.executeCommandOnSingleNode (
459
459
(JedisClusterCommandCallback <Long >) client -> Converters .millisecondsToTimeUnit (client .pttl (key ), timeUnit ),
460
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
460
+ connection .clusterGetNodeForKey (key ))
461
461
.getValue ();
462
462
}
463
463
@@ -472,7 +472,7 @@ public byte[] dump(byte[] key) {
472
472
473
473
return connection .getClusterCommandExecutor ()
474
474
.executeCommandOnSingleNode ((JedisClusterCommandCallback <byte []>) client -> client .dump (key ),
475
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
475
+ connection .clusterGetNodeForKey (key ))
476
476
.getValue ();
477
477
}
478
478
@@ -499,7 +499,7 @@ public void restore(byte[] key, long ttlInMillis, byte[] serializedValue, boolea
499
499
return JedisConverters .toString (this .connection .execute ("RESTORE" , key ,
500
500
Arrays .asList (JedisConverters .toBytes (ttlInMillis ), serializedValue , JedisConverters .toBytes ("REPLACE" ))));
501
501
502
- }, connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ));
502
+ }, connection .clusterGetNodeForKey (key ));
503
503
}
504
504
505
505
/*
@@ -582,7 +582,7 @@ public ValueEncoding encodingOf(byte[] key) {
582
582
583
583
return connection .getClusterCommandExecutor ()
584
584
.executeCommandOnSingleNode ((JedisClusterCommandCallback <byte []>) client -> client .objectEncoding (key ),
585
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
585
+ connection .clusterGetNodeForKey (key ))
586
586
.mapValue (JedisConverters ::toEncoding );
587
587
}
588
588
@@ -598,7 +598,7 @@ public Duration idletime(byte[] key) {
598
598
599
599
return connection .getClusterCommandExecutor ()
600
600
.executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .objectIdletime (key ),
601
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
601
+ connection .clusterGetNodeForKey (key ))
602
602
.mapValue (Converters ::secondsToDuration );
603
603
}
604
604
@@ -614,7 +614,7 @@ public Long refcount(byte[] key) {
614
614
615
615
return connection .getClusterCommandExecutor ()
616
616
.executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .objectRefcount (key ),
617
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
617
+ connection .clusterGetNodeForKey (key ))
618
618
.getValue ();
619
619
620
620
}
0 commit comments