private void restoreVirtualAndSwitcher(final LocalPhysicalGraph lpg, final SnapShotDescripter snapShot)
            throws RestoreException {
        Iterator<LocalVertex> iter = lpg.iteratorOfVertex();
        while (iter.hasNext()) {
            final LocalVertex localVertex = iter.next();
            if (localVertex instanceof LocalPhysicalVertex) {
                final LocalPhysicalVertex lpv = (LocalPhysicalVertex) localVertex;
                final Vertex v = lpv.getVertex();

                if (v instanceof VirtualVertex) {
                    final LocalPhysicalVertex actual = lpv.getActualVertex();
                    lpv.setLocalThread(actual.getLocalThread());
                    lpv.setInstance(actual.getModuleInstance());
                } else if (v instanceof SwitcherVertex) {
                    final SwitcherVertex switcher = (SwitcherVertex) v;
                    final ModuleBase instance = instanceManager.createNewInstance(switcher);
                    LocalThread thread = resourceManager.assignCPUResource(job, switcher.getCpuUsage(), busyLoopMode);
                    lpv.setLocalThread(thread);
                    lpv.setInstance(instance);
                }
            }
        }
    }