Exemple #1
0
 internal PeerDht(Peer peer, StorageLayer storageLayer, DistributedHashTable dht, StorageRpc storageRpc)
 {
     Peer         = peer;
     StorageLayer = storageLayer;
     Dht          = dht;
     StorageRpc   = storageRpc;
 }
Exemple #2
0
 /// <summary>
 /// Registers the storage RPC for PUT, COMPARE PUT, GET, ADD and REMOVE.
 /// </summary>
 /// <param name="peerBean"></param>
 /// <param name="connectionBean"></param>
 /// <param name="storageLayer"></param>
 public StorageRpc(PeerBean peerBean, ConnectionBean connectionBean, StorageLayer storageLayer)
     : base(peerBean, connectionBean)
 {
     Register(
         Rpc.Commands.Put.GetNr(),
         Rpc.Commands.Get.GetNr(),
         Rpc.Commands.Add.GetNr(),
         Rpc.Commands.Remove.GetNr(),
         Rpc.Commands.Digest.GetNr(),
         Rpc.Commands.DigestBloomfilter.GetNr(),
         Rpc.Commands.DigestAllBloomfilter.GetNr(),
         Rpc.Commands.PutMeta.GetNr(),
         Rpc.Commands.DigestMetaValues.GetNr(),
         Rpc.Commands.PutConfirm.GetNr(),
         Rpc.Commands.GetLatest.GetNr(),
         Rpc.Commands.GetLatestWithDigest.GetNr(),
         Rpc.Commands.ReplicaPut.GetNr());
     _bloomfilterFactory = peerBean.BloomfilterFactory;
     _storageLayer       = storageLayer;
 }