public class ThreadLocalQueryProfiler extends Object
Modifier and Type | Field and Description |
---|---|
static String |
LUCENE_GROUP |
Modifier and Type | Method and Description |
---|---|
static void |
checkClosed(boolean forceClose)
This can be triggered when we are sure the context should be closed.
|
static void |
end() |
static boolean |
inContext() |
static void |
start() |
static void |
store(String group,
Supplier<String> querySupplier,
long time) |
public static final String LUCENE_GROUP
public static void start()
public static boolean inContext()
public static void store(String group, Supplier<String> querySupplier, long time)
querySupplier
- supplier of query string. Some queries can be really big. That's why we wan't to evaluate
them only if neededpublic static void end()
public static void checkClosed(boolean forceClose)
forceClose
is true.
This means something went wrong (more start()
then end()
) on the thread stack and we want
to make sure the thread is clean.
Note: only call this if you just did a end()
and you can not be part of an outer contextforceClose
- when true force close the contextCopyright © 2002-2021 Atlassian. All Rights Reserved.