Пример #1
0
 public static Connection GetStorageConnection(IPEndPoint endPoint)
 {
     lock((storePools as ICollection).SyncRoot)
     {
         if (!storePools.ContainsKey(endPoint))
         {
             Pool pool = new Pool(endPoint, FDFSConfig.Storage_MaxConnection);
             storePools.Add(endPoint, pool);
         }
     }
     return storePools[endPoint].GetConnection();
 }