\r\n

51Degrees Pipeline Java  4.4

51Degrees Pipeline for Java

fiftyone.pipeline.engines.trackers.TrackerBase< T > 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 FlowData 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 FlowData instance as defined by DataKeyedCacheBase. The meta-data can be any type and is specified using the generic type parameter T.

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

Parameters
<T> - the type of the meta-data object that the tracker stores with each key value.

Inheritance diagram for fiftyone.pipeline.engines.trackers.TrackerBase< T >:

[legend]

Collaboration diagram for fiftyone.pipeline.engines.trackers.TrackerBase< T >:

[legend]

Public Member Functions

 TrackerBase (CacheConfiguration config)
Construct a new instance. More...
boolean  track (FlowData flowData)
Track the specified FlowData instance. More...

Public Member Functions inherited from fiftyone.pipeline.engines.caching.DataKeyedCacheBase< V >

 DataKeyedCacheBase (CacheConfiguration configuration)
Construct a new instance. More...
V  get (FlowData flowData)
void  put (FlowData flowData, V value)
void  close () throws IOException

Public Member Functions inherited from fiftyone.caching.PutCache< K, V >

void  put (K key, V value)
Add an item to the cache. More...

Public Member Functions inherited from fiftyone.caching.Cache< K, V >

V  get (K key)
Retrieves the value for key requested. More...

Protected Member Functions

abstract T  newValue (FlowData data)
Create a tracker value instance. More...
abstract boolean  match (FlowData data, T value)
Update the tracker value with relevant details. More...

Protected Member Functions inherited from fiftyone.pipeline.engines.caching.DataKeyedCacheBase< V >

abstract EvidenceKeyFilter  getFilter ()
Returns the EvidenceKeyFilter to use when generating a key from FlowData instances. More...

Constructor & Destructor Documentation

Member Function Documentation

◆ match()

abstract boolean fiftyone.pipeline.engines.trackers.TrackerBase< T >.match ( FlowData   data,
T   value  
)
abstract protected

Update the tracker value with relevant details.

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

Parameters
data - the FlowData 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 T fiftyone.pipeline.engines.trackers.TrackerBase< T >.newValue ( FlowData   data )
abstract protected

Create a tracker value instance.

Called when a new key is added to the tracker. The FlowData that is being added to the tracker.

Parameters
data - the FlowData 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()

boolean fiftyone.pipeline.engines.trackers.TrackerBase< T >.track ( FlowData   flowData )

Track the specified FlowData 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
flowData - the FlowData to track
Returns
true if further processing is allowed by the tracker's logic, false otherwise

Implements fiftyone.pipeline.engines.trackers.Tracker.

On This Page