| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (version 1.7.0_75) on Mon Jun 08 05:48:08 EDT 2015 --> |
| <title>ResourceComputationScheduler (EMF Compare API Specification)</title> |
| <meta name="date" content="2015-06-08"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ResourceComputationScheduler (EMF Compare API Specification)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ResourceComputationScheduler.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../../../index-files/index-1.html">Index</a></li> |
| <li><a href="../../../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><em><span style='font-size:small'><b>EMF Compare</b><br>3.2.0.201506080946</span></em></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResolvedEvent.html" title="class in org.eclipse.emf.compare.ide.ui.internal.logical.resolver"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyFoundEvent.html" title="class in org.eclipse.emf.compare.ide.ui.internal.logical.resolver"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../../../../index.html?org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html" target="_top">Frames</a></li> |
| <li><a href="ResourceComputationScheduler.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.eclipse.emf.compare.ide.ui.internal.logical.resolver</div> |
| <h2 title="Class ResourceComputationScheduler" class="title">Class ResourceComputationScheduler<T></h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.eclipse.emf.compare.ide.ui.internal.logical.resolver.ResourceComputationScheduler<T></li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - type of keys used to keep track of currently ongoing computations.</dd></dl> |
| <hr> |
| <br> |
| <pre>public class <span class="strong">ResourceComputationScheduler<T></span> |
| extends <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">Class providing facilities to schedule computations and hide as much as possible the multi-threaded |
| complexity. Each computation is identified by a key. Each computation is supposed to possibly load |
| resources, and the scheduler also provides a facility to unload resources that are no longer needed.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#ResourceComputationScheduler()">ResourceComputationScheduler</a></strong>()</code> |
| <div class="block">Constructor, configured to wait for tasks completion for 5 seconds (will wait at most 10 seconds).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#ResourceComputationScheduler(int,%20java.util.concurrent.TimeUnit)">ResourceComputationScheduler</a></strong>(int shutdownWaitDuration, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a> shutdownWaitUnit)</code> |
| <div class="block">Constructor.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><U> U</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#call(java.util.concurrent.Callable,%20java.lang.Runnable)">call</a></strong>(<a href="http://download.oracle.com/javase/8/docs/api/java/util/concurrent/Callable.html?is-external=true" title="class or interface in java.util.concurrent">Callable</a><U> callable, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> postTreatment)</code> |
| <div class="block">Executes the given callable as soon as possible.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#clearComputedElements()">clearComputedElements</a></strong>()</code> |
| <div class="block">Clears the set of computed keys.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#computeAll(java.lang.Iterable)">computeAll</a></strong>(<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><? extends <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/IComputation.html" title="interface in org.eclipse.emf.compare.ide.ui.internal.logical.resolver">IComputation</a><<a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html" title="type parameter in ResourceComputationScheduler">T</a>>> computations)</code> |
| <div class="block">Schedules all the given computations, which will only be run if no computation for the same key is in |
| the <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#computedKeys"><code>computedKeys</code></a> variable.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#demandShutdown()">demandShutdown</a></strong>()</code> |
| <div class="block">If <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#shutdownInProgress"><code>shutdown has not been requested before</code></a>, it submits a new task to |
| <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#shutdownPools()"><code>shut down</code></a> <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#computingPool"><code>computingPool</code></a> and <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#unloadingPool"><code>unloadingPool</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#dispose()">dispose</a></strong>()</code> |
| <div class="block">Disposes this scheduler, which shuts down its <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#terminator"><code>terminator</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>com.google.common.collect.ImmutableSet<<a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html" title="type parameter in ResourceComputationScheduler">T</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#getComputedElements()">getComputedElements</a></strong>()</code> |
| <div class="block">Provides the set of keys of all the computations that have been run or are still running since its set |
| of keys <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#computedKeys"><code>computedKeys</code></a> was last set.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#initialize()">initialize</a></strong>()</code> |
| <div class="block">Initializes this scheduler, which instantiates its <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#terminator"><code>terminator</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#isInitialized()">isInitialized</a></strong>()</code> |
| <div class="block">Indicates whether this scheduler is initialized, i.e. it can run computations.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#runAll(java.lang.Iterable)">runAll</a></strong>(<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><? extends <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> runnables)</code> |
| <div class="block">Executes all the runnables in the given iterable, and returns when all computations possibly running or |
| launched by the given runnables are finished.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#scheduleComputation(org.eclipse.emf.compare.ide.ui.internal.logical.resolver.IComputation)">scheduleComputation</a></strong>(<a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/IComputation.html" title="interface in org.eclipse.emf.compare.ide.ui.internal.logical.resolver">IComputation</a><<a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html" title="type parameter in ResourceComputationScheduler">T</a>> computation)</code> |
| <div class="block">Schedules a given computation to be performed as soon as possible, if its key is not present in the |
| <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#computedKeys"><code>computedKeys</code></a> or in the <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#currentlyComputing"><code>currentlyComputing</code></a> keys, in which case the computation is |
| ignored.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#scheduleUnload(java.lang.Runnable,%20com.google.common.util.concurrent.FutureCallback)">scheduleUnload</a></strong>(<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> runnable, |
| com.google.common.util.concurrent.FutureCallback<<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> callback)</code> |
| <div class="block">Schedule a job that is suppoed to unload resource(s) that are no longer needed.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#setComputedElements(java.lang.Iterable)">setComputedElements</a></strong>(<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html" title="type parameter in ResourceComputationScheduler">T</a>> elements)</code> |
| <div class="block">Sets the computed keys with all the values in the given iterable.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="ResourceComputationScheduler()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ResourceComputationScheduler</h4> |
| <pre>public ResourceComputationScheduler()</pre> |
| <div class="block">Constructor, configured to wait for tasks completion for 5 seconds (will wait at most 10 seconds).</div> |
| </li> |
| </ul> |
| <a name="ResourceComputationScheduler(int, java.util.concurrent.TimeUnit)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ResourceComputationScheduler</h4> |
| <pre>public ResourceComputationScheduler(int shutdownWaitDuration, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a> shutdownWaitUnit)</pre> |
| <div class="block">Constructor.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>shutdownWaitDuration</code> - Time to wait for current tasks completion when shutting down the pools (will wait at most |
| twice this amount of time).</dd><dd><code>shutdownWaitUnit</code> - Unit to use to interpret the other parameter.</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="demandShutdown()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>demandShutdown</h4> |
| <pre>public void demandShutdown()</pre> |
| <div class="block">If <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#shutdownInProgress"><code>shutdown has not been requested before</code></a>, it submits a new task to |
| <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#shutdownPools()"><code>shut down</code></a> <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#computingPool"><code>computingPool</code></a> and <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#unloadingPool"><code>unloadingPool</code></a>. Do nothing if |
| current thread already is interrupted.</div> |
| </li> |
| </ul> |
| <a name="initialize()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>initialize</h4> |
| <pre>public void initialize()</pre> |
| <div class="block">Initializes this scheduler, which instantiates its <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#terminator"><code>terminator</code></a>. Can be called several times |
| with no problem.</div> |
| </li> |
| </ul> |
| <a name="isInitialized()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isInitialized</h4> |
| <pre>public boolean isInitialized()</pre> |
| <div class="block">Indicates whether this scheduler is initialized, i.e. it can run computations.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if and only if the scheduler is initialized.</dd></dl> |
| </li> |
| </ul> |
| <a name="dispose()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dispose</h4> |
| <pre>public void dispose()</pre> |
| <div class="block">Disposes this scheduler, which shuts down its <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#terminator"><code>terminator</code></a>.</div> |
| </li> |
| </ul> |
| <a name="call(java.util.concurrent.Callable, java.lang.Runnable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>call</h4> |
| <pre>public <U> U call(<a href="http://download.oracle.com/javase/8/docs/api/java/util/concurrent/Callable.html?is-external=true" title="class or interface in java.util.concurrent">Callable</a><U> callable, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> postTreatment)</pre> |
| <div class="block">Executes the given callable as soon as possible. Whatever happens, the given callback is run before |
| returning (in a "finally" clause) and then the "notComputing" condition will be signalled and the lock |
| released. |
| <p> |
| <b>Pre-conditions:</b> |
| <ul> |
| <li><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#initialize()"><code>initialize()</code></a> has been called</li> |
| <li><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#dispose()"><code>dispose()</code></a> has not been called</li> |
| </ul> |
| </p></div> |
| <dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>U</code> - the type of the return value.</dd><dt><span class="strong">Parameters:</span></dt><dd><code>callable</code> - will be executed as soon as this instance is no longer computing anything. Must not be |
| <code>null</code>.</dd><dd><code>postTreatment</code> - will be called in a finally clause, whatever the outcome of the computation. Can be |
| <code>null</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The result returned by the given callable execution.</dd></dl> |
| </li> |
| </ul> |
| <a name="computeAll(java.lang.Iterable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>computeAll</h4> |
| <pre>public void computeAll(<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><? extends <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/IComputation.html" title="interface in org.eclipse.emf.compare.ide.ui.internal.logical.resolver">IComputation</a><<a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html" title="type parameter in ResourceComputationScheduler">T</a>>> computations)</pre> |
| <div class="block">Schedules all the given computations, which will only be run if no computation for the same key is in |
| the <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#computedKeys"><code>computedKeys</code></a> variable. It is up to the caller to make sure that the semantics of |
| computations previously run is the same as thos they are submitting, otherwise computations completely |
| unrelated to what is being submitted may have marked a key as already computed. Returns after all the |
| currently running plus submitted computations have finished.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>computations</code> - An iterable over the computations to schedule. <code>null</code> entries are silently ignored.</dd></dl> |
| </li> |
| </ul> |
| <a name="scheduleComputation(org.eclipse.emf.compare.ide.ui.internal.logical.resolver.IComputation)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>scheduleComputation</h4> |
| <pre>public boolean scheduleComputation(<a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/IComputation.html" title="interface in org.eclipse.emf.compare.ide.ui.internal.logical.resolver">IComputation</a><<a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html" title="type parameter in ResourceComputationScheduler">T</a>> computation)</pre> |
| <div class="block">Schedules a given computation to be performed as soon as possible, if its key is not present in the |
| <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#computedKeys"><code>computedKeys</code></a> or in the <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#currentlyComputing"><code>currentlyComputing</code></a> keys, in which case the computation is |
| ignored. It is up to the caller to make sure that they submit homogeneous computations, in order for |
| the filtering of computations by key to be meaningful. |
| <p> |
| <b>WARNING!</b> In a multi-threaded execution, this method may return before the computation is run. It |
| is up to callers to make sure they only invoke that inside of a more general call to |
| <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#call(java.util.concurrent.Callable,%20java.lang.Runnable)"><code>call(Callable, Runnable)</code></a>, <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#computeAll(java.lang.Iterable)"><code>computeAll(Iterable)</code></a>, or <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#runAll(java.lang.Iterable)"><code>runAll(Iterable)</code></a> |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>computation</code> - The computation to run. Cannot be <code>null</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>true</code> if and only if the given key is not already among either the computed elements or |
| the currently computing elements.</dd></dl> |
| </li> |
| </ul> |
| <a name="runAll(java.lang.Iterable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>runAll</h4> |
| <pre>public void runAll(<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><? extends <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> runnables)</pre> |
| <div class="block">Executes all the runnables in the given iterable, and returns when all computations possibly running or |
| launched by the given runnables are finished. This must be used when some treatment will possibly |
| schedule computations but the exact list of computations cannot be computed beforehand.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>runnables</code> - An iterable over the runnables to execute, must not be <code>null</code>. <code>null</code> entries |
| are silently ignored.</dd></dl> |
| </li> |
| </ul> |
| <a name="scheduleUnload(java.lang.Runnable, com.google.common.util.concurrent.FutureCallback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>scheduleUnload</h4> |
| <pre>public void scheduleUnload(<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> runnable, |
| com.google.common.util.concurrent.FutureCallback<<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> callback)</pre> |
| <div class="block">Schedule a job that is suppoed to unload resource(s) that are no longer needed. This implementation |
| uses a dedicated thread pool to perform these unloads.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>runnable</code> - Runnable to run, must not be <code>null</code></dd><dd><code>callback</code> - Callback to call upon completion, can be <code>null</code></dd></dl> |
| </li> |
| </ul> |
| <a name="getComputedElements()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getComputedElements</h4> |
| <pre>public com.google.common.collect.ImmutableSet<<a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html" title="type parameter in ResourceComputationScheduler">T</a>> getComputedElements()</pre> |
| <div class="block">Provides the set of keys of all the computations that have been run or are still running since its set |
| of keys <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#computedKeys"><code>computedKeys</code></a> was last set.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>The set of keys of all the computations that have been run or are still running since its set |
| of keys <a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html#computedKeys"><code>computedKeys</code></a> was last set.</dd></dl> |
| </li> |
| </ul> |
| <a name="clearComputedElements()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clearComputedElements</h4> |
| <pre>public void clearComputedElements()</pre> |
| <div class="block">Clears the set of computed keys.</div> |
| </li> |
| </ul> |
| <a name="setComputedElements(java.lang.Iterable)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>setComputedElements</h4> |
| <pre>public void setComputedElements(<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html" title="type parameter in ResourceComputationScheduler">T</a>> elements)</pre> |
| <div class="block">Sets the computed keys with all the values in the given iterable.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>elements</code> - An iterable over the elements to set as computed, must not be <code>null</code> but can be empty.</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ResourceComputationScheduler.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../../../index-files/index-1.html">Index</a></li> |
| <li><a href="../../../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><em><span style='font-size:small'><b>EMF Compare</b><br>3.2.0.201506080946</span></em></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResolvedEvent.html" title="class in org.eclipse.emf.compare.ide.ui.internal.logical.resolver"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../../../../../org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyFoundEvent.html" title="class in org.eclipse.emf.compare.ide.ui.internal.logical.resolver"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../../../../index.html?org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.html" target="_top">Frames</a></li> |
| <li><a href="ResourceComputationScheduler.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small><br><span style='font-size:small;float:right'>Copyright (c) 2006, 2014 Obeo and others. All rights reserved.</span></small></p> |
| </body> |
| </html> |