private void updateCaches(ViewInstanceEntity instanceEntity) {
    ViewEntity viewEntity = getDefinition(instanceEntity.getViewName());
    viewEntity.removeInstanceDefinition(instanceEntity.getInstanceName());
    removeInstanceDefinition(viewEntity, instanceEntity.getInstanceName());
    // remove the web app context
    handlerList.removeViewInstance(instanceEntity);
  }
Uninstall a view instance for the view with the given view name.

@param instanceEntity the view instance entity
@throws IllegalStateException if the given instance is not in a valid state
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java