C# 클래스 StopGuessing.Controllers.DistributedBinomialLadderFilterController

파일 보기 프로젝트 열기: Microsoft/StopGuessing 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
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