public void set(T obj, ViewContext context) {
    if (!viewSingletonObjects.containsKey(tClass)) {
      synchronized (viewSingletonObjects) {
        if (!viewSingletonObjects.containsKey(tClass)) {
          viewSingletonObjects.put(tClass, new ConcurrentHashMap<String, Object>());
        }
      }
    }
    String key = getTagName(context);
    LOG.info("setting key : value {} : {}", key,obj );
    Map<String, Object> instances = viewSingletonObjects.get(tClass);
    instances.put(key, obj);
  }
Method for directly setting user-local singleton instances.
@param obj new variable value for current user
@param context ViewContext that provides username and instance name
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/UserLocal.java