Class ExecuteDataSpecification
java.lang.Object
uk.ac.manchester.spinnaker.front_end.BoardLocalSupport
uk.ac.manchester.spinnaker.front_end.dse.ExecuteDataSpecification
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
FastExecuteDataSpecification
,HostExecuteDataSpecification
Common base for executing data specifications.
- Author:
- Donal Fellows
-
Nested Class Summary
Nested classes/interfaces inherited from class uk.ac.manchester.spinnaker.front_end.BoardLocalSupport
BoardLocalSupport.BoardLocal
-
Field Summary
FieldsFields inherited from class uk.ac.manchester.spinnaker.front_end.BoardLocalSupport
machine, storage
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ExecuteDataSpecification
(uk.ac.manchester.spinnaker.machine.Machine machine, DSEDatabaseEngine db) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
processTasksInParallel
(Collection<DSEStorage.Ethernet> tasks, Function<DSEStorage.Ethernet, BasicExecutor.SimpleCallable> mapper) Run the tasks in parallel.Methods inherited from class uk.ac.manchester.spinnaker.front_end.BoardLocalSupport
getJob, getTransceiver
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.AutoCloseable
close
-
Field Details
-
db
The database.
-
-
Constructor Details
-
ExecuteDataSpecification
@MustBeClosed protected ExecuteDataSpecification(uk.ac.manchester.spinnaker.machine.Machine machine, DSEDatabaseEngine db) throws IOException, ProcessException, InterruptedException, StorageException, URISyntaxException - Parameters:
machine
- The description of the SpiNNaker machine.db
- The DSE database.- Throws:
IOException
- If the transceiver can't talk to its sockets.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If communications are interrupted.IllegalStateException
- If something really strange occurs with talking to the BMP; this constructor should not be doing that!StorageException
- If the database cannot be read.URISyntaxException
- If the proxy URI is specified but not valid.
-
-
Method Details
-
processTasksInParallel
protected final void processTasksInParallel(Collection<DSEStorage.Ethernet> tasks, Function<DSEStorage.Ethernet, BasicExecutor.SimpleCallable> mapper) throws StorageException, IOException, ProcessException, InterruptedExceptionRun the tasks in parallel. Submits toexecutor
and detoxifies the exceptions.- Parameters:
tasks
- The tasks to run.mapper
- Gets how to implement a task.- Throws:
StorageException
- If the database can't be talked to.IOException
- If the transceiver can't talk to its sockets.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If communications are interrupted.IllegalStateException
- If an unexpected exception occurs in any of the parallel tasks.
-