import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
/**
* base class holding visualization and analysis attributes and common logic for
return false;
}
+ private ScheduledExecutorService serviceExecutor = Executors.newSingleThreadScheduledExecutor();
+
+ /**
+ * Get a default scheduled executor service which can be used by
+ * services and calculators to run parallel jobs associated with this
+ * viewport.
+ *
+ * @return default service executor of that viewport
+ */
+ public ScheduledExecutorService getServiceExecutor()
+ {
+ return serviceExecutor;
+ }
+
public void setAlignment(AlignmentI align)
{
this.alignment = align;
gapcounts = null;
calculator.shutdown();
calculator = null;
+ serviceExecutor.shutdown();
+ serviceExecutor = null;
residueShading = null; // may hold a reference to Consensus
changeSupport = null;
ranges = null;