Class 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  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addExecution​(TemplateTrack templateTrack)
      Add a new template track into the map
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • templateExecutions

        protected java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.Integer>> templateExecutions
    • Constructor Detail

      • TemplatesExecutionMap

        public TemplatesExecutionMap()
    • 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 identifier
        templateManager - the template manager used to retrieve the global templates
        Returns:
        map having as key the template's name and as value the logarithm sum