C# Class StopGuessing.Controllers.DistributedBinomialLadderFilterController

Afficher le fichier Open project: Microsoft/StopGuessing Class Usage Examples

Protected Properties

Свойство Type Description
FilterClient StopGuessing.Clients.DistributedBinomialLadderFilterClient
NumberOfBitsPerShard int
SecretSaltToPreventAlgorithmicComplexityAttacks string
ShardsByIndex FilterArray>.Dictionary

Méthodes publiques

Méthode Description
DistributedBinomialLadderFilterController ( DistributedBinomialLadderFilterClient distributedBinomialLadderFilterClient, int numberOfBitsPerShard, string secretSaltToPreventAlgorithmicComplexityAttacks ) : System.Collections.Generic

Construct the controller (server) for requests to this host for its shards of the binomial ladder filter.

Méthodes protégées

Méthode Description
GetShard ( int shardNumber ) : FilterArray

Get the fitler array that stores a shard based on the shard number.

GetShard ( string element ) : FilterArray

Get the fitler array that stores a shard associated with a given element.

Private Methods

Méthode Description
AssignRandomBit ( [ shardNumber, [ valueToAssign ) : void
DistributedStepAsync ( [ element, [ heightOfLadderInRungs ) : int
GetHeight ( [ element, [ heightOfLadderInRungs = null ) : int

Method Details

DistributedBinomialLadderFilterController() public méthode

Construct the controller (server) for requests to this host for its shards of the binomial ladder filter.
public DistributedBinomialLadderFilterController ( DistributedBinomialLadderFilterClient distributedBinomialLadderFilterClient, int numberOfBitsPerShard, string secretSaltToPreventAlgorithmicComplexityAttacks ) : System.Collections.Generic
distributedBinomialLadderFilterClient StopGuessing.Clients.DistributedBinomialLadderFilterClient A client used by this server to access the servers hosting other shards of the filter.
numberOfBitsPerShard int The number of bits that each shard should contain.
secretSaltToPreventAlgorithmicComplexityAttacks string /// A secret used to salt the filter's hash functions so as to prevent attacks that might try to find collisions in the small space we are hashing to.
Résultat System.Collections.Generic

GetShard() protected méthode

Get the fitler array that stores a shard based on the shard number.
protected GetShard ( int shardNumber ) : FilterArray
shardNumber int The shard number (index) to get.
Résultat StopGuessing.DataStructures.FilterArray

GetShard() protected méthode

Get the fitler array that stores a shard associated with a given element.
protected GetShard ( string element ) : FilterArray
element string The element to associate with a shard.
Résultat StopGuessing.DataStructures.FilterArray

Property Details

FilterClient protected_oe property

Since the filter is distributed into shards which are stored on many hosts, we need a client to access the shards of the filter that are stored on other hosts.
protected DistributedBinomialLadderFilterClient,StopGuessing.Clients FilterClient
Résultat StopGuessing.Clients.DistributedBinomialLadderFilterClient

NumberOfBitsPerShard protected_oe property

The number of bits stored in each shard.
protected int NumberOfBitsPerShard
Résultat int

SecretSaltToPreventAlgorithmicComplexityAttacks protected_oe property

A secret string used to salt hashes so as to prevent algorithmic complexity attacks.
protected string SecretSaltToPreventAlgorithmicComplexityAttacks
Résultat string

ShardsByIndex protected_oe property

The shards of the filter that this host has a (not-necessarily-up-to-date) copy of.
protected Dictionary ShardsByIndex
Résultat FilterArray>.Dictionary