Mercurial > projects > dwt2
comparison org.eclipse.equinox.common/src/org/eclipse/core/runtime/IProgressMonitorWithBlocking.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children | bbe49769ec18 |
comparison
equal
deleted
inserted
replaced
11:43904fec5dca | 12:bc29606a740c |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2003, 2006 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM - Initial API and implementation | |
10 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module org.eclipse.core.runtime.IProgressMonitorWithBlocking; | |
14 | |
15 import org.eclipse.core.runtime.IProgressMonitor; | |
16 import org.eclipse.core.runtime.IStatus; | |
17 | |
18 import java.lang.all; | |
19 | |
20 /** | |
21 * An extension to the IProgressMonitor interface for monitors that want to | |
22 * support feedback when an activity is blocked due to concurrent activity in | |
23 * another thread. | |
24 * <p> | |
25 * When a monitor that supports this extension is passed to an operation, the | |
26 * operation should call <code>setBlocked</code> whenever it knows that it | |
27 * must wait for a lock that is currently held by another thread. The operation | |
28 * should continue to check for and respond to cancelation requests while | |
29 * blocked. When the operation is no longer blocked, it must call <code>clearBlocked</code> | |
30 * to clear the blocked state. | |
31 * <p> | |
32 * This interface can be used without OSGi running. | |
33 * </p><p> | |
34 * Clients may implement this interface. | |
35 * </p> | |
36 * @see IProgressMonitor | |
37 * @since 3.0 | |
38 */ | |
39 public interface IProgressMonitorWithBlocking : IProgressMonitor { | |
40 /** | |
41 * Indicates that this operation is blocked by some background activity. If | |
42 * a running operation ever calls <code>setBlocked</code>, it must | |
43 * eventually call <code>clearBlocked</code> before the operation | |
44 * completes. | |
45 * <p> | |
46 * If the caller is blocked by a currently executing job, this method will return | |
47 * an <code>IJobStatus</code> indicating the job that is currently blocking | |
48 * the caller. If this blocking job is not known, this method will return a plain | |
49 * informational <code>IStatus</code> object. | |
50 * </p> | |
51 * | |
52 * @param reason an optional status object whose message describes the | |
53 * reason why this operation is blocked, or <code>null</code> if this | |
54 * information is not available. | |
55 * @see #clearBlocked() | |
56 */ | |
57 public void setBlocked(IStatus reason); | |
58 | |
59 /** | |
60 * Clears the blocked state of the running operation. If a running | |
61 * operation ever calls <code>setBlocked</code>, it must eventually call | |
62 * <code>clearBlocked</code> before the operation completes. | |
63 * | |
64 * @see #setBlocked(IStatus) | |
65 */ | |
66 public void clearBlocked(); | |
67 | |
68 } |