Skip to content

IPlacementDirector Methods

Interface for placement directors.

GetPlacementHint(Dictionary<string, object>, SiloAddress[])

static
View source
public static SiloAddress GetPlacementHint(Dictionary<string, object> requestContextData, SiloAddress[] compatibleSilos)
Gets the placement hint from the provided request context data, if present and valid.

Parameters

requestContextDataDictionary<string, object>
The request context data.
compatibleSilosSiloAddress[]
The compatible silos.

Returns

The placement hint, if present and valid, or null otherwise.

OnAddActivation(PlacementStrategy, PlacementTarget, IPlacementContext)

abstract
public abstract Task<SiloAddress> OnAddActivation(PlacementStrategy strategy, PlacementTarget target, IPlacementContext context)
Picks an appropriate silo to place the specified target on.

Parameters

strategyPlacementStrategy
The target's placement strategy.
targetPlacementTarget
The grain being placed as well as information about the request which triggered the placement.
contextIPlacementContext
The placement context.

Returns

An appropriate silo to place the specified target on.