コード例 #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)));
 }
コード例 #2
0
ファイル: Metadata.cs プロジェクト: welly87/csharp-driver
 public ICollection <IPAddress> GetReplicas(byte[] partitionKey)
 {
     if (_tokenMap == null)
     {
         return(new List <IPAddress>());
     }
     return(_tokenMap.GetReplicas(_tokenMap.Factory.Hash(partitionKey)));
 }
コード例 #3
0
ファイル: Metadata.cs プロジェクト: panuoksala/csharp-driver
 /// <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)));
 }