diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/SynchronousJpaProjectUpdater.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/SynchronousJpaProjectUpdater.java | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/SynchronousJpaProjectUpdater.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/SynchronousJpaProjectUpdater.java deleted file mode 100644 index 314b92e8d4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/SynchronousJpaProjectUpdater.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.core.internal; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.utility.Command; -import org.eclipse.jpt.utility.internal.synchronizers.CallbackSynchronizer; -import org.eclipse.jpt.utility.internal.synchronizers.CallbackSynchronousSynchronizer; - -/** - * Adapt the "callback synchronizer" interface to the JPA project "updater" - * interface. - * <p> - * This updater will "update" the JPA project immediately and not return until - * the "update" and all resulting "updates" are complete. This implementation - * should be used sparingly and for as short a time as possible, as it increases - * the probability of deadlocks. A deadlock can occur when a JPA project is - * updated from multiple threads and various resources are locked in varying - * orders. - */ -public class SynchronousJpaProjectUpdater - extends AbstractSynchronizerJpaProjectUpdater -{ - public SynchronousJpaProjectUpdater(JpaProject jpaProject) { - super(jpaProject); - } - - @Override - protected CallbackSynchronizer buildSynchronizer() { - return new CallbackSynchronousSynchronizer(this.buildCommand()); - } - - protected Command buildCommand() { - return new Command() { - public void execute() { - SynchronousJpaProjectUpdater.this.jpaProject.update(new NullProgressMonitor()); - } - }; - } - -} |