Exemplo n.º 1
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 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);
 }
Exemplo n.º 3
0
 public void Dispose()
 {
     if (pht != null)
     {
         pht.Dispose();
         pht = null;
     }
 }
Exemplo n.º 4
0
 public void Dispose()
 {
     if (pht != null)
     {
         pht.Dispose();
         pht = null;
     }
 }
 public DistributedHashTableMasterHost(string name, IExecuter executer, int port)
 {
     this.executer = executer;
     master = new DistributedHashTableMaster();
     master.TopologyChanged += OnTopologyChanged;
     listener = new TcpListener(IPAddress.Any, port);
     hashTable = new PersistentHashTable.PersistentHashTable(name);
 }
 public DistributedHashTableMasterHost(string name, IExecuter executer, int port)
 {
     this.executer           = executer;
     master                  = new DistributedHashTableMaster();
     master.TopologyChanged += OnTopologyChanged;
     listener                = new TcpListener(IPAddress.Any, port);
     hashTable               = new PersistentHashTable.PersistentHashTable(name);
 }
 public PhtSubscriptionStorage(
     string subscriptionPath,
     IMessageSerializer messageSerializer,
     IReflection reflection)
 {
     this.subscriptionPath = subscriptionPath;
     this.messageSerializer = messageSerializer;
     this.reflection = reflection;
     pht = new PersistentHashTable.PersistentHashTable(subscriptionPath);
 }
Exemplo n.º 8
0
 public PhtSubscriptionStorage(
     string subscriptionPath,
     IMessageSerializer messageSerializer,
     IReflection reflection)
 {
     this.subscriptionPath  = subscriptionPath;
     this.messageSerializer = messageSerializer;
     this.reflection        = reflection;
     pht = new PersistentHashTable.PersistentHashTable(subscriptionPath);
 }
 public DistributedHashTableNodeReplication(PersistentHashTable.PersistentHashTable hashTable)
 {
     this.hashTable = hashTable;
 }
 public DistributedHashTableNodeReplication(PersistentHashTable.PersistentHashTable hashTable)
 {
     this.hashTable = hashTable;
 }