X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.simulator.variable%2Fsrc%2Forg%2Fsimantics%2Fsimulator%2Fvariable%2FRealm.java;fp=bundles%2Forg.simantics.simulator.variable%2Fsrc%2Forg%2Fsimantics%2Fsimulator%2Fvariable%2FRealm.java;h=849bfe0d49950a50cb8d175396744d9750e37b44;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=b3ecdeec3a11b2d6213fbbb21ddc50e854cbb060;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.simulator.variable/src/org/simantics/simulator/variable/Realm.java b/bundles/org.simantics.simulator.variable/src/org/simantics/simulator/variable/Realm.java index b3ecdeec3..849bfe0d4 100644 --- a/bundles/org.simantics.simulator.variable/src/org/simantics/simulator/variable/Realm.java +++ b/bundles/org.simantics.simulator.variable/src/org/simantics/simulator/variable/Realm.java @@ -1,41 +1,41 @@ -/******************************************************************************* - * Copyright (c) 2013 Association for Decentralized Information Management - * in Industry THTH ry. - * 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: - * VTT Technical Research Centre of Finland - initial API and implementation - * Semantum Oy - initial API and implementation - *******************************************************************************/ -package org.simantics.simulator.variable; - -/** - * Realm controls access to some local resource. - * - * @author Hannu Niemistö - * @author Antti Villberg - */ -public interface Realm { - - /** - * Executes the given runnable in this realm synchronously so that the method - * returns only after the runnable has finished. Can be called only when not - * inside the realm. Calling the method in the realm either causes - * a deadlock or {@link IllegalStateException}. - * @throws InterruptedException - */ - void syncExec(Runnable runnable) throws InterruptedException; - - /** - * Executes the runnable in this realm asynchronously. - * This method can be called freely inside or outside of the realm. - * When executed inside the realm it is guaranteed that no - * internal event (for example a simulator step) is taken before - * executing the runnable. - */ - void asyncExec(Runnable runnable); - -} +/******************************************************************************* + * Copyright (c) 2013 Association for Decentralized Information Management + * in Industry THTH ry. + * 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: + * VTT Technical Research Centre of Finland - initial API and implementation + * Semantum Oy - initial API and implementation + *******************************************************************************/ +package org.simantics.simulator.variable; + +/** + * Realm controls access to some local resource. + * + * @author Hannu Niemistö + * @author Antti Villberg + */ +public interface Realm { + + /** + * Executes the given runnable in this realm synchronously so that the method + * returns only after the runnable has finished. Can be called only when not + * inside the realm. Calling the method in the realm either causes + * a deadlock or {@link IllegalStateException}. + * @throws InterruptedException + */ + void syncExec(Runnable runnable) throws InterruptedException; + + /** + * Executes the runnable in this realm asynchronously. + * This method can be called freely inside or outside of the realm. + * When executed inside the realm it is guaranteed that no + * internal event (for example a simulator step) is taken before + * executing the runnable. + */ + void asyncExec(Runnable runnable); + +}