\r\n

51Degrees Pipeline Python  4.2Newer Version 4.3

51Degrees Pipeline for Python
  • pipeline-python
  • fiftyone_pipeline_engines_fiftyone
  • fiftyone_pipeline_engines_fiftyone
  • share_usage_tracker
  • ShareUsageTracker

pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage_tracker.ShareUsageTracker Class Reference

Detailed Description

The ShareUsageTracker is used by the ShareUsageElement to determine whether to put evidence into a bundle to be sent to the 51Degrees Share Usage service.

Inheritance diagram for pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage_tracker.ShareUsageTracker:

[legend]

Collaboration diagram for pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage_tracker.ShareUsageTracker:

[legend]

Public Member Functions

def  __init__ (self, size=100, interval=1000)
Constructor for ShareUsageTracker @type size: int. More...
def  match (self, key, value)
The track method calls the dataKeyedCache get method, if it receives a result it sends it onto a match function. More...
def  get_cache_value (self, cachekey)
Get data from the cache @type key : string. More...
def  set_cache_value (self, cachekey, value=None)
Place data in the cache @type key : string. More...

Public Attributes

 interval
 cache

Constructor & Destructor Documentation

◆ __init__()

def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage_tracker.ShareUsageTracker.__init__ (   self,
  size = 100,
  interval = 1000  
)

Constructor for ShareUsageTracker @type size: int.

Parameters
size - size of the share usage lru cache @type interval: int
interval - how often to put evidence into the cache

Member Function Documentation

◆ get_cache_value()

def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage_tracker.ShareUsageTracker.get_cache_value (   self,
  cachekey  
)

Get data from the cache @type key : string.

Parameters
key - : The cache key to lookup @type value : mixed
key - : None , or the stored data

◆ match()

def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage_tracker.ShareUsageTracker.match (   self,
  key,
  value  
)

The track method calls the dataKeyedCache get method, if it receives a result it sends it onto a match function.

@type key : cache key to run through tracker @rtype bool

Returns
result of tracking

◆ set_cache_value()

def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage_tracker.ShareUsageTracker.set_cache_value (   self,
  cachekey,
  value = None  
)

Place data in the cache @type key : string.

Parameters
key - : The cache key to store data under @type value : mixed
key - : Not used here as value is set to the date