Changes between Version 7 and Version 8 of Grits_ProjectPreferenceStore

03/08/2017 05:52:32 PM (5 years ago)



  • Grits_ProjectPreferenceStore

    v7 v8  
    1 = Project Preference Store =
     1= Project Preference Store ( A Local Preference Store for Project)=
    3 ProjectPreferenceStore caches the preference values in maps and calls '''IGritsPreferenceStore''' only if the value is not found in the map.
     4'''ProjectPreferenceStore''' is a local store for storing preference values related to project, e.g. preference for project's Task information. This local store caches the preference values in maps (map key is the id of the preference variable). It calls '''GritsPreferenceStore''' only if the value is not found in its map.
     6Major Advantages:
     71. Currently the central '''GritsPreferenceStore''' does not store any preference value in maps and reads from file each time a preference value is read. This local preference store minimizes multiple read from file by keeping a cache of preference values in memory that have been read once.
     92. Currently preference values are stored as string in the preference file. Each time  a preference is read, a generic '''PreferenceEntity''' object is created by '''GritsPreference''' store. This '''PreferenceEntity''' object is later converted to more specific preference object for getting preference values. '''ProjectPreferenceStore''' reduces multiple unnecessary de-serialization of preference values from strings stored in file. [[BR]]For example, if there were four tasks, '''ProjectPreferenceStore''' would cache a list of four tasks (along with its default information) which would be otherwise each time read as string from file, unmarshalled to PreferenceEntity object and then converted to list of tasks.
     11These advantages are general for any similar local preference store in GRITS and are recommended for plugins that would be using preferences.
    513== Code Snippet ==