C# Класс StopGuessing.Controllers.DistributedBinomialLadderFilterController

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
FilterClient StopGuessing.Clients.DistributedBinomialLadderFilterClient
NumberOfBitsPerShard int
SecretSaltToPreventAlgorithmicComplexityAttacks string
ShardsByIndex FilterArray>.Dictionary

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
AssignRandomBit ( [ shardNumber, [ valueToAssign ) : void
DistributedStepAsync ( [ element, [ heightOfLadderInRungs ) : int
GetHeight ( [ element, [ heightOfLadderInRungs = null ) : int

Описание методов

DistributedBinomialLadderFilterController() публичный Метод

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.
Результат System.Collections.Generic

GetShard() защищенный Метод

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.
Результат StopGuessing.DataStructures.FilterArray

GetShard() защищенный Метод

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.
Результат StopGuessing.DataStructures.FilterArray

Описание свойств

FilterClient защищенное свойство

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
Результат StopGuessing.Clients.DistributedBinomialLadderFilterClient

NumberOfBitsPerShard защищенное свойство

The number of bits stored in each shard.
protected int NumberOfBitsPerShard
Результат int

SecretSaltToPreventAlgorithmicComplexityAttacks защищенное свойство

A secret string used to salt hashes so as to prevent algorithmic complexity attacks.
protected string SecretSaltToPreventAlgorithmicComplexityAttacks
Результат string

ShardsByIndex защищенное свойство

The shards of the filter that this host has a (not-necessarily-up-to-date) copy of.
protected Dictionary ShardsByIndex
Результат FilterArray>.Dictionary