\r\n

51Degrees Pipeline .NET  4.1Newer Version 4.4

51Degrees Pipeline for .NET

FiftyOne.Pipeline.Engines.Trackers.TrackerBase< TValue > Class Template Reference abstract

Detailed Description

The abstract base class for trackers.

A tracker is a data structure that stores meta-data relating to a key derived from a given IFlowData instance. The details of key creation and the specifics of the meta-data are determined by the tracker implementation. The key will always be a DataKey instance as defined by DataKeyedCacheBase<TValue>. The meta-data can be any type and is specified using the generic type parameter TValue.

As an example, a tracker could create a key using the source IP address from the IFlowData evidence and use the associated meta-data to store a count of the number of times a given source IP has been seen.

Template Parameters
TValue - The type of the meta-data object that the tracker stores with each key value.

Inheritance diagram for FiftyOne.Pipeline.Engines.Trackers.TrackerBase< TValue >:

[legend]

Collaboration diagram for FiftyOne.Pipeline.Engines.Trackers.TrackerBase< TValue >:

[legend]

Public Member Functions

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

Public Member Functions inherited from FiftyOne.Pipeline.Engines.Caching.DataKeyedCacheBase< TValue >

 DataKeyedCacheBase (CacheConfiguration configuration)
Constructor More...
virtual void  Put (IFlowData data, TValue value)
Add the specified data to the cache. More...
void  Dispose ()
IDisposable support More...

Protected Member Functions

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...

Protected Member Functions inherited from FiftyOne.Pipeline.Engines.Caching.DataKeyedCacheBase< TValue >

abstract IEvidenceKeyFilter  GetFilter ()
Returns the IEvidenceKeyFilter to use when generating a key from IFlowData instances. More...

Constructor & Destructor Documentation

Member Function Documentation

◆ Match()

abstract bool FiftyOne.Pipeline.Engines.Trackers.TrackerBase< TValue >.Match ( IFlowData   data,
TValue   value  
)
protected pure virtual

Update the tracker value with relevant details.

Called when a tracked item matches an instance already in the tracker.

Parameters
data - The IFlowData that has matched an existing entry in the tracker.
value - The meta-data instance that the tracker holds for the key generated from the data.
Returns
True if the tracker's logic allows further processing of this flow data instance. False otherwise.

◆ NewValue()

abstract TValue FiftyOne.Pipeline.Engines.Trackers.TrackerBase< TValue >.NewValue ( IFlowData   data )
protected pure virtual

Create a tracker value instance.

Called when a new key is added to the tracker.

Parameters
data - The IFlowData that is being added to the tracker.
Returns
A new meta-data instance to be stored with the DataKey created from the flow data instance.

◆ Track()

Track the specified IFlowData instance.

If the key created from the data does not yet exist in the tracker then it will be added. If it does already exist then the meta-data will be updated according to the tracker implementation's logic.

Parameters
data - The IFlowData to track.
Returns
True if no matching entry existed in the tracker or if the entry existed but further processing is allowed by the tracker's logic. False if a matching entry was found and the tracker's logic does not allow further processing of this flow data instance.

Implements FiftyOne.Pipeline.Engines.Trackers.ITracker.