Package ome.services.pixeldata
Class PixelDataThread
- java.lang.Object
-
- ome.services.util.ExecutionThread
-
- ome.services.pixeldata.PixelDataThread
-
- All Implemented Interfaces:
java.lang.Runnable
,java.util.EventListener
,org.springframework.context.ApplicationListener<ome.io.messages.MissingPyramidMessage>
public class PixelDataThread extends ExecutionThread implements org.springframework.context.ApplicationListener<ome.io.messages.MissingPyramidMessage>
- Since:
- Beta4.3
-
-
Field Summary
-
Fields inherited from class ome.services.util.ExecutionThread
executor, manager, principal, work
-
-
Constructor Summary
Constructors Constructor Description PixelDataThread(boolean performProcessing, SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads)
Calls main constructor withNullMetrics
.PixelDataThread(boolean performProcessing, SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics)
Calls main constructor with read-only status being all read-write.PixelDataThread(boolean performProcessing, SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics, ReadOnlyStatus readOnly)
Main constructor.PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, java.lang.String uuid)
Deprecated.PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, java.lang.String uuid, int numThreads)
Deprecated.PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics)
Deprecated.PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics, ReadOnlyStatus readOnly)
CalculatesperformProcessing
based on the existence of the "pixelDataTrigger" and passes all parameters tothe main ctor
.PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads)
Deprecated.PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics)
Deprecated.PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics, ReadOnlyStatus readOnly)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doRun()
Loads event logs from thePixelDataHandler
processing them all then in a background thread via aExecutorCompletionService
.void
onApplicationEvent(ome.io.messages.MissingPyramidMessage mpm)
Called in the main server (Blitz-0) in order to create a PIXELDATAEventLog
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.-
Methods inherited from class ome.services.util.ExecutionThread
getPrincipal, run, sessionInit
-
-
-
-
Constructor Detail
-
PixelDataThread
@Deprecated public PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, java.lang.String uuid)
Deprecated.Uses defaultPrincipal
for processing
-
PixelDataThread
@Deprecated public PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, java.lang.String uuid, int numThreads)
Deprecated.Uses defaultPrincipal
for processing and aNullMetrics
instance.
-
PixelDataThread
@Deprecated public PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads)
Deprecated.CalculatesperformProcessing
based on the existence of the "pixelDataTrigger" and passes all parameters tothe main ctor
passing aNullMetrics
as necessary.
-
PixelDataThread
@Deprecated public PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics)
Deprecated.CalculatesperformProcessing
based on the existence of the "pixelDataTrigger" and passes all parameters tothe main ctor
.
-
PixelDataThread
public PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics, ReadOnlyStatus readOnly)
CalculatesperformProcessing
based on the existence of the "pixelDataTrigger" and passes all parameters tothe main ctor
.
-
PixelDataThread
@Deprecated public PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics)
Deprecated.CalculatesperformProcessing
based on the existence of the "pixelDataTrigger" and passes all parameters tothe main ctor
.
-
PixelDataThread
@Deprecated public PixelDataThread(SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics, ReadOnlyStatus readOnly)
Deprecated.CalculatesperformProcessing
based on the existence of the "pixelDataTrigger" and passes all parameters tothe main ctor
.
-
PixelDataThread
public PixelDataThread(boolean performProcessing, SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads)
Calls main constructor withNullMetrics
.
-
PixelDataThread
public PixelDataThread(boolean performProcessing, SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics)
Calls main constructor with read-only status being all read-write.
-
PixelDataThread
public PixelDataThread(boolean performProcessing, SessionManager manager, Executor executor, PixelDataHandler handler, ome.system.Principal principal, java.lang.String uuid, int numThreads, ome.system.metrics.Metrics metrics, ReadOnlyStatus readOnly)
Main constructor. No arguments can be null.
-
-
Method Detail
-
start
public void start()
Called by Spring on creation. Currently a no-op.
-
doRun
public void doRun()
Loads event logs from thePixelDataHandler
processing them all then in a background thread via aExecutorCompletionService
.numThreads
variable is also used there, so the value returned should match. In case it isn't, we additionally use anArrayBlockingQueue
to hold the results.- Specified by:
doRun
in classExecutionThread
-
onExecutionException
protected void onExecutionException(java.util.concurrent.ExecutionException ee)
Basic handling just logs at ERROR level. Subclasses (especially for testing) can do more.
-
stop
public void stop()
Called by Spring on destruction.
-
onApplicationEvent
public void onApplicationEvent(ome.io.messages.MissingPyramidMessage mpm)
Called in the main server (Blitz-0) in order to create a PIXELDATAEventLog
which will get processed by PixelData-0.- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<ome.io.messages.MissingPyramidMessage>
-
-