Package org.mycore.iview2.services
Class MCRImageTiler
java.lang.Object
org.mycore.iview2.services.MCRImageTiler
- All Implemented Interfaces:
Comparable<MCRShutdownHandler.Closeable>
,Runnable
,MCRShutdownHandler.Closeable
Master image tiler thread.
- Author:
- Thomas Scheffler (yagee)
-
Field Summary
Fields inherited from interface org.mycore.common.events.MCRShutdownHandler.Closeable
DEFAULT_PRIORITY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Shuts down this thread and every local tiling threads spawned byrun()
.static MCRImageTiler
int
Returns the priority.static boolean
void
stops transmittingMCRTileJob
toMCRTilingAction
and prepares shutdown.void
run()
Starts local tiler threads (MCRTilingAction
) and givesMCRTileJob
instances to them.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mycore.common.events.MCRShutdownHandler.Closeable
compareTo
-
Method Details
-
isRunning
public static boolean isRunning()- Returns:
- true if image tiler thread is running.
-
getInstance
- Returns:
- an instance of this class.
-
run
public void run()Starts local tiler threads (MCRTilingAction
) and givesMCRTileJob
instances to them. Use propertyMCR.Module-iview2.TilingThreads
to specify how many concurrent threads should be running. -
prepareClose
public void prepareClose()stops transmittingMCRTileJob
toMCRTilingAction
and prepares shutdown.- Specified by:
prepareClose
in interfaceMCRShutdownHandler.Closeable
-
close
public void close()Shuts down this thread and every local tiling threads spawned byrun()
.- Specified by:
close
in interfaceMCRShutdownHandler.Closeable
-
getPriority
public int getPriority()Description copied from interface:MCRShutdownHandler.Closeable
Returns the priority. A Closeable with a higher priority will be closed before a Closeable with a lower priority. Default priority is 5.- Specified by:
getPriority
in interfaceMCRShutdownHandler.Closeable
-