Ejemplo n.º 1
0
 /// <summary>
 /// Get the replicas for a given partition key and keyspace
 /// </summary>
 public ICollection <Host> GetReplicas(string keyspaceName, byte[] partitionKey)
 {
     if (_tokenMap == null)
     {
         return(new Host[0]);
     }
     return(_tokenMap.GetReplicas(keyspaceName, _tokenMap.Factory.Hash(partitionKey)));
 }
Ejemplo n.º 2
0
 public ICollection <IPAddress> GetReplicas(byte[] partitionKey)
 {
     if (_tokenMap == null)
     {
         return(new List <IPAddress>());
     }
     return(_tokenMap.GetReplicas(_tokenMap.Factory.Hash(partitionKey)));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Get the replicas for a given partition key and keyspace
 /// </summary>
 public ICollection <Host> GetReplicas(string keyspaceName, byte[] partitionKey)
 {
     if (_tokenMap == null)
     {
         Metadata.Logger.Warning("Metadata.GetReplicas was called but there was no token map.");
         return(new Host[0]);
     }
     return(_tokenMap.GetReplicas(keyspaceName, _tokenMap.Factory.Hash(partitionKey)));
 }