Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
class BucketingManager
import { BucketingManager } from "https://deno.land/x/flagship_io_js_sdk@3.2.4/decision/BucketingManager.ts";

Constructors

new
BucketingManager(
httpClient: IHttpClient,
murmurHash: MurmurHash,
)

Properties

private
_bucketingContent: BucketingDTO
private
_intervalID: any
private
_isFirstPooling: boolean
private
_isPooling: boolean
private
_lastModified: string
private
_murmurHash: MurmurHash

Methods

private
checkAndTargeting(targetings: Targetings[], visitor: VisitorAbstract): boolean
private
finishLoop(response: IHttpResponse)
private
getVariation(variationGroup: VariationGroupDTO, visitor: VisitorAbstract): VariationDTO | null
private
getVisitorCampaigns(
variationGroups: VariationGroupDTO[],
campaignId: string,
campaignType: string,
visitor: VisitorAbstract,
): CampaignDTO | null
private
isANDListOperator(operator: string): boolean
private
isMatchTargeting(variationGroup: VariationGroupDTO, visitor: VisitorAbstract): boolean
private
polling()
private
sendContext(visitor: VisitorAbstract): Promise<void>
private
testListOperator(
operator: string,
contextValue: primitive,
value: any[],
): boolean
private
testListOperatorLoop(
operator: string,
contextValue: primitive,
value: any[],
initialCheck: boolean,
)
private
testOperator(
operator: string,
contextValue: primitive,
value: any,
): boolean
getCampaignsAsync(visitor: VisitorAbstract): Promise<CampaignDTO[] | null>
getThirdPartySegment(visitorId: string): Promise<Record<string, primitive>>
startPolling(): Promise<void>
stopPolling(): void