Package org.apache.ignite.spi
Class IgniteSpiThread
- java.lang.Object
- 
- java.lang.Thread
- 
- org.apache.ignite.thread.IgniteThread
- 
- org.apache.ignite.spi.IgniteSpiThread
 
 
 
- 
- All Implemented Interfaces:
- Runnable
 
 public abstract class IgniteSpiThread extends IgniteThread This class provides convenient adapter for threads used by SPIs. This class adds necessary plumbing on top of theIgniteThreadclass:- Proper exception handling in body()
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class java.lang.ThreadThread.State, Thread.UncaughtExceptionHandler
 
- 
 - 
Field Summary- 
Fields inherited from class org.apache.ignite.thread.IgniteThreadGRP_IDX_UNASSIGNED, igniteInstanceName
 - 
Fields inherited from class java.lang.ThreadMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedIgniteSpiThread(String igniteInstanceName, String name, IgniteLogger log)Creates thread with givenname.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidbody()Body of SPI thread.protected voidcleanup()Should be overridden by child classes if cleanup logic is required.voidrun()StringtoString()- 
Methods inherited from class org.apache.ignite.thread.IgniteThreadcachePoolThread, compositeRwLockIndex, compositeRwLockIndex, createName, current, currentThreadCanRequestBinaryMetadata, getIgniteInstanceName, isForbiddenToRequestBinaryMetadata, onEntryProcessorEntered, onEntryProcessorLeft, onForbidBinaryMetadataRequestSectionEntered, onForbidBinaryMetadataRequestSectionLeft, policy, stripe
 - 
Methods inherited from class java.lang.ThreadactiveCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, yield
 
- 
 
- 
- 
- 
Constructor Detail- 
IgniteSpiThreadprotected IgniteSpiThread(String igniteInstanceName, String name, IgniteLogger log) Creates thread with givenname.- Parameters:
- igniteInstanceName- Name of grid this thread is created in.
- name- Thread's name.
- log- Grid logger to use.
 
 
- 
 - 
Method Detail- 
cleanupprotected void cleanup() Should be overridden by child classes if cleanup logic is required.
 - 
bodyprotected abstract void body() throws InterruptedExceptionBody of SPI thread.- Throws:
- InterruptedException- If thread got interrupted.
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- IgniteThread
 
 
- 
 
-