public static StorageUtil getInstance(ViewContext context) {
    if (!viewSingletonObjects.containsKey(context.getInstanceName()))
      viewSingletonObjects.put(context.getInstanceName(), new StorageUtil(context));
    return viewSingletonObjects.get(context.getInstanceName());
  }
Storage factory, creates storage of Local or Persistence API type.
Type depends on context configuration: if "dataworker.storagePath" is set,
storage of Local type will be created.  Otherwise, Persistence API will be used.

Storage is singleton.
contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/utils/StorageUtil.java