\r\n

51Degrees Pipeline .NET  4.4

51Degrees Pipeline for .NET

FiftyOne.Pipeline.Engines.FiftyOne.Trackers.ShareUsageTracker Class Reference

Detailed Description

A tracker used by share usage to attempt to avoid repeatedly sending data relating to the same user session.

Inheritance diagram for FiftyOne.Pipeline.Engines.FiftyOne.Trackers.ShareUsageTracker:

[legend]

Collaboration diagram for FiftyOne.Pipeline.Engines.FiftyOne.Trackers.ShareUsageTracker:

[legend]

Public Member Functions

 ShareUsageTracker (CacheConfiguration configuration, TimeSpan interval, IEvidenceKeyFilter filter)
Constructor More...

Public Member Functions inherited from FiftyOne.Pipeline.Engines.Trackers.TrackerBase< DateTime?>

 TrackerBase (CacheConfiguration configuration)
Constructor More...
bool  Track (IFlowData data)
Track the specified IFlowData instance. More...

Protected Member Functions

override IEvidenceKeyFilter  GetFilter ()
Get the evidence filter used to create keys for this tracker. More...
override bool  Match (IFlowData data, DateTime? value)
Called when the flow data matches an existing entry in the tracker More...
override? DateTime  NewValue (IFlowData data)
Called when a new instance of this tracker's meta-data is needed to add to the tracker. More...

Protected Member Functions inherited from FiftyOne.Pipeline.Engines.Trackers.TrackerBase< DateTime?>

abstract TValue  NewValue (IFlowData data)
Create a tracker value instance. More...
abstract bool  Match (IFlowData data, TValue value)
Update the tracker value with relevant details. More...

Constructor & Destructor Documentation

◆ ShareUsageTracker()

FiftyOne.Pipeline.Engines.FiftyOne.Trackers.ShareUsageTracker.ShareUsageTracker ( CacheConfiguration   configuration,
TimeSpan   interval,
IEvidenceKeyFilter   filter  
)

Constructor

Parameters
configuration - The cache configuration to use when building the internal cache used by this tracker
filter - The IEvidenceKeyFilter that defines the evidence values to use when creating a key from an IFlowData.
interval - The tracker will return a match and update the matching entry if it is younger than this time interval. If it is older then it will not return a match.

Member Function Documentation

◆ GetFilter()

override IEvidenceKeyFilter FiftyOne.Pipeline.Engines.FiftyOne.Trackers.ShareUsageTracker.GetFilter ( )
protected

Get the evidence filter used to create keys for this tracker.

Returns
The IEvidenceKeyFilter to use.

◆ Match()

override bool FiftyOne.Pipeline.Engines.FiftyOne.Trackers.ShareUsageTracker.Match ( IFlowData   data,
DateTime?   value  
)
protected

Called when the flow data matches an existing entry in the tracker

Parameters
data - The flow data
value - The meta-data value associated with the flow data in the tracker.
Returns
Boolean - if tracked values age is less than the period set by _interval then return true and update. Else if older then consider new and return false.

◆ NewValue()

override? DateTime FiftyOne.Pipeline.Engines.FiftyOne.Trackers.ShareUsageTracker.NewValue ( IFlowData   data )
protected

Called when a new instance of this tracker's meta-data is needed to add to the tracker.

Parameters
data - The IFlowData that is being added to the tracker.
Returns
True as the meta-data holds no extra detail for this tracker.