From 35a8c96e3acf451115f217b8b196c7fc1099f6b4 Mon Sep 17 00:00:00 2001 From: Brian Vosburgh Date: Thu, 14 Mar 2013 13:19:58 -0400 Subject: rename SingleUseQueueingExtendedJobCommandExecutor to SingleUseQueueingExtendedJobCommandContext --- ...SingleUseQueueingExtendedJobCommandContext.java | 103 +++++++++++++++++++++ ...ingleUseQueueingExtendedJobCommandExecutor.java | 103 --------------------- 2 files changed, 103 insertions(+), 103 deletions(-) create mode 100644 common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/command/SingleUseQueueingExtendedJobCommandContext.java delete mode 100644 common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/command/SingleUseQueueingExtendedJobCommandExecutor.java (limited to 'common/plugins/org.eclipse.jpt.common.core') diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/command/SingleUseQueueingExtendedJobCommandContext.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/command/SingleUseQueueingExtendedJobCommandContext.java new file mode 100644 index 0000000000..364b8f2fcf --- /dev/null +++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/command/SingleUseQueueingExtendedJobCommandContext.java @@ -0,0 +1,103 @@ +/******************************************************************************* + * Copyright (c) 2012, 2013 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.common.core.internal.utility.command; + +import org.eclipse.core.runtime.jobs.ISchedulingRule; +import org.eclipse.jpt.common.core.utility.command.CombinedExtendedCommandContext; +import org.eclipse.jpt.common.core.utility.command.JobCommand; +import org.eclipse.jpt.common.utility.command.Command; +import org.eclipse.jpt.common.utility.command.ExtendedCommandContext; +import org.eclipse.jpt.common.utility.command.StatefulExtendedCommandContext; +import org.eclipse.jpt.common.utility.internal.command.SingleUseQueueingExtendedCommandExecutor; + +/** + * This command context wraps and extends a {@link SingleUseQueueingExtendedCommandExecutor}, + * adding support for executing {@link JobCommand}s. + */ +public class SingleUseQueueingExtendedJobCommandContext + extends AbstractSingleUseQueueingJobCommandContext + implements CombinedExtendedCommandContext, StatefulExtendedCommandContext +{ + public SingleUseQueueingExtendedJobCommandContext() { + this(new SingleUseQueueingExtendedCommandExecutor()); + } + + public SingleUseQueueingExtendedJobCommandContext(ExtendedCommandContext commandExecutor) { + this(new SingleUseQueueingExtendedCommandExecutor(commandExecutor)); + } + + public SingleUseQueueingExtendedJobCommandContext(StatefulExtendedCommandContext commandExecutor) { + this(new SingleUseQueueingExtendedCommandExecutor(commandExecutor)); + } + + public SingleUseQueueingExtendedJobCommandContext(SingleUseQueueingExtendedCommandExecutor commandExecutor) { + super(commandExecutor); + } + + /** + * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command) + */ + public void waitToExecute(Command command) throws InterruptedException { + this.commandExecutor.waitToExecute(command); + } + + /** + * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command, long) + */ + public boolean waitToExecute(Command command, long timeout) throws InterruptedException { + return this.commandExecutor.waitToExecute(command, timeout); + } + + /** + * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command) + */ + public void waitToExecute(JobCommand command) throws InterruptedException { + this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command)); + } + + /** + * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command, long) + */ + public boolean waitToExecute(JobCommand command, long timeout) throws InterruptedException { + return this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command), timeout); + } + + /** + * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command) + */ + public void waitToExecute(JobCommand command, String jobName) throws InterruptedException { + // ignore 'jobName' + this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command)); + } + + /** + * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command, long) + */ + public boolean waitToExecute(JobCommand command, String jobName, long timeout) throws InterruptedException { + // ignore 'jobName' + return this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command), timeout); + } + + /** + * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command) + */ + public void waitToExecute(JobCommand command, String jobName, ISchedulingRule rule) throws InterruptedException { + // ignore 'jobName' and 'rule' + this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command)); + } + + /** + * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command, long) + */ + public boolean waitToExecute(JobCommand command, String jobName, ISchedulingRule rule, long timeout) throws InterruptedException { + // ignore 'jobName' and 'rule' + return this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command), timeout); + } +} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/command/SingleUseQueueingExtendedJobCommandExecutor.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/command/SingleUseQueueingExtendedJobCommandExecutor.java deleted file mode 100644 index b107bf2191..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/command/SingleUseQueueingExtendedJobCommandExecutor.java +++ /dev/null @@ -1,103 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 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.common.core.internal.utility.command; - -import org.eclipse.core.runtime.jobs.ISchedulingRule; -import org.eclipse.jpt.common.core.utility.command.CombinedExtendedCommandContext; -import org.eclipse.jpt.common.core.utility.command.JobCommand; -import org.eclipse.jpt.common.utility.command.Command; -import org.eclipse.jpt.common.utility.command.ExtendedCommandContext; -import org.eclipse.jpt.common.utility.command.StatefulExtendedCommandContext; -import org.eclipse.jpt.common.utility.internal.command.SingleUseQueueingExtendedCommandExecutor; - -/** - * This command executor wraps and extends a {@link SingleUseQueueingExtendedCommandExecutor}, - * adding support for executing {@link JobCommand}s. - */ -public class SingleUseQueueingExtendedJobCommandExecutor - extends AbstractSingleUseQueueingJobCommandContext - implements CombinedExtendedCommandContext, StatefulExtendedCommandContext -{ - public SingleUseQueueingExtendedJobCommandExecutor() { - this(new SingleUseQueueingExtendedCommandExecutor()); - } - - public SingleUseQueueingExtendedJobCommandExecutor(ExtendedCommandContext commandExecutor) { - this(new SingleUseQueueingExtendedCommandExecutor(commandExecutor)); - } - - public SingleUseQueueingExtendedJobCommandExecutor(StatefulExtendedCommandContext commandExecutor) { - this(new SingleUseQueueingExtendedCommandExecutor(commandExecutor)); - } - - public SingleUseQueueingExtendedJobCommandExecutor(SingleUseQueueingExtendedCommandExecutor commandExecutor) { - super(commandExecutor); - } - - /** - * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command) - */ - public void waitToExecute(Command command) throws InterruptedException { - this.commandExecutor.waitToExecute(command); - } - - /** - * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command, long) - */ - public boolean waitToExecute(Command command, long timeout) throws InterruptedException { - return this.commandExecutor.waitToExecute(command, timeout); - } - - /** - * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command) - */ - public void waitToExecute(JobCommand command) throws InterruptedException { - this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command)); - } - - /** - * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command, long) - */ - public boolean waitToExecute(JobCommand command, long timeout) throws InterruptedException { - return this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command), timeout); - } - - /** - * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command) - */ - public void waitToExecute(JobCommand command, String jobName) throws InterruptedException { - // ignore 'jobName' - this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command)); - } - - /** - * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command, long) - */ - public boolean waitToExecute(JobCommand command, String jobName, long timeout) throws InterruptedException { - // ignore 'jobName' - return this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command), timeout); - } - - /** - * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command) - */ - public void waitToExecute(JobCommand command, String jobName, ISchedulingRule rule) throws InterruptedException { - // ignore 'jobName' and 'rule' - this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command)); - } - - /** - * @see SingleUseQueueingExtendedCommandExecutor#waitToExecute(Command, long) - */ - public boolean waitToExecute(JobCommand command, String jobName, ISchedulingRule rule, long timeout) throws InterruptedException { - // ignore 'jobName' and 'rule' - return this.commandExecutor.waitToExecute(new JobCommandCommandAdapter(command), timeout); - } -} -- cgit v1.2.3