@@ -455,7 +455,7 @@ public Long pTtl(byte[] key) {
455
455
456
456
return connection .getClusterCommandExecutor ()
457
457
.executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .pttl (key ),
458
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
458
+ connection .clusterGetNodeForKey (key ))
459
459
.getValue ();
460
460
}
461
461
@@ -471,7 +471,7 @@ public Long pTtl(byte[] key, TimeUnit timeUnit) {
471
471
return connection .getClusterCommandExecutor ()
472
472
.executeCommandOnSingleNode (
473
473
(JedisClusterCommandCallback <Long >) client -> Converters .millisecondsToTimeUnit (client .pttl (key ), timeUnit ),
474
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
474
+ connection .clusterGetNodeForKey (key ))
475
475
.getValue ();
476
476
}
477
477
@@ -486,7 +486,7 @@ public byte[] dump(byte[] key) {
486
486
487
487
return connection .getClusterCommandExecutor ()
488
488
.executeCommandOnSingleNode ((JedisClusterCommandCallback <byte []>) client -> client .dump (key ),
489
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
489
+ connection .clusterGetNodeForKey (key ))
490
490
.getValue ();
491
491
}
492
492
@@ -513,7 +513,7 @@ public void restore(byte[] key, long ttlInMillis, byte[] serializedValue, boolea
513
513
return JedisConverters .toString (this .connection .execute ("RESTORE" , key ,
514
514
Arrays .asList (JedisConverters .toBytes (ttlInMillis ), serializedValue , JedisConverters .toBytes ("REPLACE" ))));
515
515
516
- }, connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ));
516
+ }, connection .clusterGetNodeForKey (key ));
517
517
}
518
518
519
519
/*
@@ -596,7 +596,7 @@ public ValueEncoding encodingOf(byte[] key) {
596
596
597
597
return connection .getClusterCommandExecutor ()
598
598
.executeCommandOnSingleNode ((JedisClusterCommandCallback <byte []>) client -> client .objectEncoding (key ),
599
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
599
+ connection .clusterGetNodeForKey (key ))
600
600
.mapValue (JedisConverters ::toEncoding );
601
601
}
602
602
@@ -612,7 +612,7 @@ public Duration idletime(byte[] key) {
612
612
613
613
return connection .getClusterCommandExecutor ()
614
614
.executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .objectIdletime (key ),
615
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
615
+ connection .clusterGetNodeForKey (key ))
616
616
.mapValue (Converters ::secondsToDuration );
617
617
}
618
618
@@ -628,7 +628,7 @@ public Long refcount(byte[] key) {
628
628
629
629
return connection .getClusterCommandExecutor ()
630
630
.executeCommandOnSingleNode ((JedisClusterCommandCallback <Long >) client -> client .objectRefcount (key ),
631
- connection .getTopologyProvider (). getTopology (). getKeyServingMasterNode (key ))
631
+ connection .clusterGetNodeForKey (key ))
632
632
.getValue ();
633
633
634
634
}
0 commit comments