public class PixelDataThread extends ExecutionThread implements org.springframework.context.ApplicationListener<MissingPyramidMessage>
executor, manager, principal, work
Constructor and Description |
---|
PixelDataThread(boolean performProcessing,
SessionManager manager,
Executor executor,
PixelDataHandler handler,
Principal principal,
java.lang.String uuid,
int numThreads)
Calls main constructor with
NullMetrics . |
PixelDataThread(boolean performProcessing,
SessionManager manager,
Executor executor,
PixelDataHandler handler,
Principal principal,
java.lang.String uuid,
int numThreads,
Metrics metrics)
Main constructor.
|
PixelDataThread(SessionManager manager,
Executor executor,
PixelDataHandler handler,
Principal principal,
java.lang.String uuid,
int numThreads)
Calculates
performProcessing based on the existence of the
"pixelDataTrigger" and passes all parameters to
the main ctor
passing a NullMetrics as necessary. |
PixelDataThread(SessionManager manager,
Executor executor,
PixelDataHandler handler,
Principal principal,
java.lang.String uuid,
int numThreads,
Metrics metrics)
Calculates
performProcessing based on the existence of the
"pixelDataTrigger" and passes all parameters to
the main ctor . |
PixelDataThread(SessionManager manager,
Executor executor,
PixelDataHandler handler,
java.lang.String uuid)
Uses default
Principal for processing |
PixelDataThread(SessionManager manager,
Executor executor,
PixelDataHandler handler,
java.lang.String uuid,
int numThreads)
Uses default
Principal for processing and a NullMetrics
instance. |
PixelDataThread(SessionManager manager,
Executor executor,
PixelDataHandler handler,
java.lang.String uuid,
int numThreads,
Metrics metrics)
Calculates
performProcessing based on the existence of the
"pixelDataTrigger" and passes all parameters to
the main ctor . |
Modifier and Type | Method and Description |
---|---|
void |
doRun()
Loads event logs from the
PixelDataHandler processing them
all then in a background thread via a ExecutorCompletionService . |
void |
onApplicationEvent(MissingPyramidMessage mpm)
Called in the main server (Blitz-0) in order to create a PIXELDATA
EventLog which will get processed by PixelData-0. |
protected void |
onExecutionException(java.util.concurrent.ExecutionException ee)
Basic handling just logs at ERROR level.
|
void |
start()
Called by Spring on creation.
|
void |
stop()
Called by Spring on destruction.
|
getPrincipal, run, sessionInit
public PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, java.lang.String uuid)
Principal
for processingpublic PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, java.lang.String uuid, int numThreads)
Principal
for processing and a NullMetrics
instance.public PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, Principal principal, java.lang.String uuid, int numThreads)
performProcessing
based on the existence of the
"pixelDataTrigger" and passes all parameters to
the main ctor
passing a NullMetrics
as necessary.public PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, java.lang.String uuid, int numThreads, Metrics metrics)
performProcessing
based on the existence of the
"pixelDataTrigger" and passes all parameters to
the main ctor
.public PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, Principal principal, java.lang.String uuid, int numThreads, Metrics metrics)
performProcessing
based on the existence of the
"pixelDataTrigger" and passes all parameters to
the main ctor
.public PixelDataThread(boolean performProcessing, SessionManager manager, Executor executor, PixelDataHandler handler, Principal principal, java.lang.String uuid, int numThreads)
NullMetrics
.public PixelDataThread(boolean performProcessing, SessionManager manager, Executor executor, PixelDataHandler handler, Principal principal, java.lang.String uuid, int numThreads, Metrics metrics)
public void start()
public void doRun()
PixelDataHandler
processing them
all then in a background thread via a ExecutorCompletionService
.
numThreads
variable is also used there, so the value returned
should match. In case it isn't, we additionally use an
ArrayBlockingQueue
to hold the results.doRun
in class ExecutionThread
protected void onExecutionException(java.util.concurrent.ExecutionException ee)
public void stop()
public void onApplicationEvent(MissingPyramidMessage mpm)
EventLog
which will get processed by PixelData-0.onApplicationEvent
in interface org.springframework.context.ApplicationListener<MissingPyramidMessage>
Version: 5.4.6-ice35-b87
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.