diff options
Diffstat (limited to 'plugins/infra/org.eclipse.papyrus.infra.sync/src/org/eclipse/papyrus/infra/sync/service/ISyncService.java')
-rw-r--r-- | plugins/infra/org.eclipse.papyrus.infra.sync/src/org/eclipse/papyrus/infra/sync/service/ISyncService.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/infra/org.eclipse.papyrus.infra.sync/src/org/eclipse/papyrus/infra/sync/service/ISyncService.java b/plugins/infra/org.eclipse.papyrus.infra.sync/src/org/eclipse/papyrus/infra/sync/service/ISyncService.java index 03152f5838f..1a77cc4a86c 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.sync/src/org/eclipse/papyrus/infra/sync/service/ISyncService.java +++ b/plugins/infra/org.eclipse.papyrus.infra.sync/src/org/eclipse/papyrus/infra/sync/service/ISyncService.java @@ -13,6 +13,9 @@ package org.eclipse.papyrus.infra.sync.service; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; + import org.eclipse.core.runtime.IStatus; import org.eclipse.papyrus.infra.core.services.IService; import org.eclipse.papyrus.infra.sync.EMFDispatch; @@ -44,4 +47,25 @@ public interface ISyncService extends ISyncObject, IService { * the new sync policy, or {@code null} to install a non-policy (meaning that everything is always synchronized) */ void setSyncPolicy(ISyncPolicy syncPolicy); + + /** + * Obtains the executor service on which to schedule asynchronous {@link SyncServiceRunnable}s. + * + * @return the asynchronous execution service; never {@code null} + * + * @see #setAsyncExecutor(Executor) + */ + Executor getAsyncExecutor(); + + /** + * Sets the executor service on which to schedule asynchronous {@link SyncServiceRunnable}s. + * If different from the {@linkplain #getAsyncExecutor() current executor}, the current executor will be + * {@linkplain ExecutorService#shutdown() shut down} if it is an {@link ExecutorService}. + * + * @param executor + * the asynchronous execution service; must not be {@code null} + * + * @see #getAsyncExecutor() + */ + void setAsyncExecutor(Executor executor); } |