public DistributedHashTableStorage(
     string database,
     IDistributedHashTableNode distributedHashTableNode)
 {
     try
     {
         hashTable = new PersistentHashTable.PersistentHashTable(database);
         hashTable.Initialize();
     }
     catch (Exception)
     {
         try
         {
             hashTable.Dispose();
         }
         catch
         {
             // not much to do if we fail here
         }
         throw;
     }
     this.distributedHashTableNode = distributedHashTableNode;
     distributedHashTableNode.Storage = this;
     Replication = new DistributedHashTableNodeReplication(hashTable);
 }
Beispiel #2
0
 public void Dispose()
 {
     if (pht != null)
     {
         pht.Dispose();
     }
 }
Beispiel #3
0
 public DistributedHashTableStorage(
     string database,
     IDistributedHashTableNode distributedHashTableNode)
 {
     try
     {
         hashTable = new PersistentHashTable.PersistentHashTable(database);
         hashTable.Initialize();
     }
     catch (Exception)
     {
         try
         {
             hashTable.Dispose();
         }
         catch
         {
             // not much to do if we fail here
         }
         throw;
     }
     this.distributedHashTableNode    = distributedHashTableNode;
     distributedHashTableNode.Storage = this;
     Replication = new DistributedHashTableNodeReplication(hashTable);
 }
 public void Dispose()
 {
     listener.Stop();
     executer.Dispose();
     master.Dispose();
     hashTable.Dispose();
 }
Beispiel #5
0
 public void Dispose()
 {
     GC.SuppressFinalize(this);
     hashTable.Dispose();
 }