类 QueryTimeManager
- java.lang.Object
-
- org.apache.iotdb.db.query.control.QueryTimeManager
-
- 所有已实现的接口:
org.apache.iotdb.commons.service.IService
public class QueryTimeManager extends java.lang.Object implements org.apache.iotdb.commons.service.IService
This class is used to monitor the executing time of each query. Once one is over the threshold, it will be killed and return the time out exception.
-
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static boolean
checkQueryAlive(long queryId)
Check given query is alive or not.void
clear()
org.apache.iotdb.commons.service.ServiceType
getID()
static QueryTimeManager
getInstance()
QueryContext
getQueryContext(long queryId)
java.util.Map<java.lang.Long,QueryContext>
getQueryContextMap()
void
killQuery(long queryId)
void
registerQuery(QueryContext context)
void
start()
void
stop()
-
-
-
方法详细资料
-
registerQuery
public void registerQuery(QueryContext context)
-
killQuery
public void killQuery(long queryId)
-
checkQueryAlive
public static boolean checkQueryAlive(long queryId)
Check given query is alive or not. We only throw the queryTimeoutRunTimeException once. If the runTimeException is thrown in main thread, it will quit directly while the return value will be used to ask sub query threads to quit. Else if it's thrown in one sub thread, other sub threads will quit by reading the return value, and main thread will catch and throw the same exception by reading the ExceptionBatchData.- 返回:
- True if alive.
-
getQueryContextMap
public java.util.Map<java.lang.Long,QueryContext> getQueryContextMap()
-
clear
public void clear()
-
getQueryContext
public QueryContext getQueryContext(long queryId)
-
getInstance
public static QueryTimeManager getInstance()
-
start
public void start()
- 指定者:
start
在接口中org.apache.iotdb.commons.service.IService
-
stop
public void stop()
- 指定者:
stop
在接口中org.apache.iotdb.commons.service.IService
-
getID
public org.apache.iotdb.commons.service.ServiceType getID()
- 指定者:
getID
在接口中org.apache.iotdb.commons.service.IService
-
-