public class DefaultTrackingService extends Object implements AppTrackingService, UpdatableContext<Key>
Feature
using TrackCycle
Constructor and Description |
---|
DefaultTrackingService() |
Modifier and Type | Method and Description |
---|---|
protected Feature |
getFeature(TrackCycle trackCycle)
Gets the
Feature from the TrackCycle |
Consumer<TrackCycle> |
getSaveTrackCycleTransformer() |
RestrictionStrategy |
getStrategy() |
protected TrackCycle |
getTrackCycle()
Gets the
TrackCycle from the ThreadLocal |
org.apache.commons.collections.Transformer |
getTrackCycleToFeatureTransformer() |
protected String |
secureValue(TrackCycle trackCycle) |
void |
setSaveTrackCycleTransformer(Consumer<TrackCycle> saveTrackCycleTransformer) |
void |
setStrategy(RestrictionStrategy strategy) |
void |
setTrackCycleToFeatureTransformer(org.apache.commons.collections.Transformer trackCycleToFeatureTransformer) |
void |
track()
Update the
TrackCycle value by 1 |
void |
track(Number incrementValueBy)
Update the
TrackCycle value by parameter value |
void |
track(TrackCycle trackCycle)
Update
TrackCycle |
void |
updateContext(Key newKey) |
public void track()
TrackCycle
value by 1track
in interface AppTrackingService
public void track(Number incrementValueBy)
TrackCycle
value by parameter valuetrack
in interface AppTrackingService
public void track(TrackCycle trackCycle)
TrackCycle
track
in interface AppTrackingService
protected String secureValue(TrackCycle trackCycle)
protected TrackCycle getTrackCycle()
TrackCycle
from the ThreadLocal
TrackCycle
protected Feature getFeature(TrackCycle trackCycle)
Feature
from the TrackCycle
Feature
public void updateContext(Key newKey)
updateContext
in interface UpdatableContext<Key>
public Consumer<TrackCycle> getSaveTrackCycleTransformer()
Consumer
function that persists a TrackCycle
public void setSaveTrackCycleTransformer(Consumer<TrackCycle> saveTrackCycleTransformer)
saveTrackCycleTransformer
- - Consumer
function that persists a TrackCycle
public org.apache.commons.collections.Transformer getTrackCycleToFeatureTransformer()
Transformer
that gets the Feature
corresponding to the provided TrackCycle
public void setTrackCycleToFeatureTransformer(org.apache.commons.collections.Transformer trackCycleToFeatureTransformer)
trackCycleToFeatureTransformer
- - Transformer
that gets the Feature
corresponding to the provided TrackCycle
public RestrictionStrategy getStrategy()
public void setStrategy(RestrictionStrategy strategy)
strategy
- - Strategy to handle thresholds and value tamperingCopyright © 2018. All rights reserved.