Package org.intermine.api.tracker
Class TemplatesExecutionMap
- java.lang.Object
-
- org.intermine.api.tracker.TemplatesExecutionMap
-
public class TemplatesExecutionMap extends java.lang.Object
Class for saving the template executions into the memory. The template executions are saved into an Map containing as a value an hashmap having as a key the user's name (or the session identifier) and as a value the number of executions for that user's name (or session identifier)- Author:
- dbutano
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>>
templateExecutions
-
Constructor Summary
Constructors Constructor Description TemplatesExecutionMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExecution(TemplateTrack templateTrack)
Add a new template track into the mapjava.util.Map<java.lang.String,java.lang.Double>
getLogarithmMap(java.lang.String executionKey, TemplateManager templateManager)
Return a map containing the logarithm's sum of the templates executions launched by the same users or during the same sessions.
-
-
-
Method Detail
-
addExecution
public void addExecution(TemplateTrack templateTrack)
Add a new template track into the map- Parameters:
templateTrack
- the template track to add
-
getLogarithmMap
public java.util.Map<java.lang.String,java.lang.Double> getLogarithmMap(java.lang.String executionKey, TemplateManager templateManager)
Return a map containing the logarithm's sum of the templates executions launched by the same users or during the same sessions. If the user name is specified, we only consider the templates executed by the user specified.- Parameters:
executionKey
- the user's name or the session identifiertemplateManager
- the template manager used to retrieve the global templates- Returns:
- map having as key the template's name and as value the logarithm sum
-
-