public class IgniteThread extends Thread
Thread
class.
Specifically, it adds:
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
static int |
GRP_IDX_UNASSIGNED
Index for unassigned thread.
|
protected String |
igniteInstanceName
The name of the Ignite instance this thread belongs to.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier | Constructor and Description |
---|---|
|
IgniteThread(org.apache.ignite.internal.util.worker.GridWorker worker)
Creates thread with given worker.
|
|
IgniteThread(String igniteInstanceName,
String threadName)
Creates grid thread with given name for a given Ignite instance.
|
|
IgniteThread(String igniteInstanceName,
String threadName,
Runnable r)
Creates grid thread with given name for a given Ignite instance.
|
|
IgniteThread(String igniteInstanceName,
String threadName,
Runnable r,
int grpIdx,
int stripe,
byte plc)
Creates grid thread with given name for a given Ignite instance with specified
thread group.
|
protected |
IgniteThread(String igniteInstanceName,
ThreadGroup threadGrp,
String threadName) |
Modifier and Type | Method and Description |
---|---|
boolean |
cachePoolThread() |
int |
compositeRwLockIndex() |
void |
compositeRwLockIndex(int compositeRwLockIdx) |
protected static String |
createName(long num,
String threadName,
String igniteInstanceName)
Creates new thread name.
|
static IgniteThread |
current() |
static boolean |
currentThreadCanRequestBinaryMetadata() |
String |
getIgniteInstanceName()
Gets name of the Ignite instance this thread belongs to.
|
boolean |
isForbiddenToRequestBinaryMetadata() |
static void |
onEntryProcessorEntered(boolean holdsTopLock)
Callback before entry processor execution is started.
|
static void |
onEntryProcessorLeft()
Callback after entry processor execution is finished.
|
static void |
onForbidBinaryMetadataRequestSectionEntered()
Callback on entering critical section where binary metadata requests are forbidden.
|
static void |
onForbidBinaryMetadataRequestSectionLeft()
Callback on leaving critical section where binary metadata requests are forbidden.
|
byte |
policy() |
int |
stripe() |
String |
toString() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
public static final int GRP_IDX_UNASSIGNED
protected final String igniteInstanceName
public IgniteThread(org.apache.ignite.internal.util.worker.GridWorker worker)
worker
- Runnable to create thread with.public IgniteThread(String igniteInstanceName, String threadName)
igniteInstanceName
- Name of the Ignite instance this thread is created for.threadName
- Name of thread.public IgniteThread(String igniteInstanceName, String threadName, Runnable r)
igniteInstanceName
- Name of the Ignite instance this thread is created for.threadName
- Name of thread.r
- Runnable to execute.public IgniteThread(String igniteInstanceName, String threadName, Runnable r, int grpIdx, int stripe, byte plc)
igniteInstanceName
- Name of the Ignite instance this thread is created for.threadName
- Name of thread.r
- Runnable to execute.plc
- GridIoPolicy
policy.grpIdx
- Thread index within a group.stripe
- Non-negative stripe number if this thread is striped pool thread.protected IgniteThread(String igniteInstanceName, ThreadGroup threadGrp, String threadName)
igniteInstanceName
- Name of the Ignite instance this thread is created for.threadGrp
- Thread group.threadName
- Name of thread.public byte policy()
GridIoPolicy
for internal Ignite pools.public int stripe()
public boolean cachePoolThread()
True
if thread belongs to pool processing cache operations.public String getIgniteInstanceName()
public int compositeRwLockIndex()
public void compositeRwLockIndex(int compositeRwLockIdx)
compositeRwLockIdx
- Composite RW lock index.public boolean isForbiddenToRequestBinaryMetadata()
True
if thread is not allowed to request binary metadata to avoid potential deadlock.public static boolean currentThreadCanRequestBinaryMetadata()
True
if thread is not allowed to request binary metadata to avoid potential deadlock.public static void onEntryProcessorEntered(boolean holdsTopLock)
holdsTopLock
- Whether to hold topology lock.public static void onEntryProcessorLeft()
public static void onForbidBinaryMetadataRequestSectionEntered()
public static void onForbidBinaryMetadataRequestSectionLeft()
public static IgniteThread current()
null
if current thread is not an instance of IgniteThread.protected static String createName(long num, String threadName, String igniteInstanceName)
num
- Thread number.threadName
- Thread name.igniteInstanceName
- Ignite instance name.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023