Class QueryContextRegistry
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.h2.opt.QueryContextRegistry
-
public class QueryContextRegistry extends Object
Registry of all currently available query contexts.
-
-
Constructor Summary
Constructors Constructor Description QueryContextRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanclearShared(UUID nodeId, long qryId)Clear shared context.voidclearSharedOnLocalNodeStop()Clear shared contexts on local node stop.voidclearSharedOnRemoteNodeStop(UUID nodeId)Clear shared contexts on remote node stop.@Nullable QueryContextgetShared(UUID nodeId, long qryId, int segmentId)Access query context from another thread.voidsetShared(UUID nodeId, long qryId, QueryContext ctx)Sets current thread local context.
-
-
-
Method Detail
-
getShared
@Nullable public @Nullable QueryContext getShared(UUID nodeId, long qryId, int segmentId)
Access query context from another thread.- Parameters:
nodeId- The node who initiated the query.qryId- The query ID.segmentId- Index segment ID.- Returns:
- Query context.
-
setShared
public void setShared(UUID nodeId, long qryId, QueryContext ctx)
Sets current thread local context. This method must be called when all the non-volatile properties are already set to ensure visibility for other threads.- Parameters:
ctx- Query context.
-
clearShared
public boolean clearShared(UUID nodeId, long qryId)
Clear shared context.- Parameters:
nodeId- The node who initiated the query.qryId- The query ID.- Returns:
Trueif context was found.
-
clearSharedOnLocalNodeStop
public void clearSharedOnLocalNodeStop()
Clear shared contexts on local node stop.
-
clearSharedOnRemoteNodeStop
public void clearSharedOnRemoteNodeStop(UUID nodeId)
Clear shared contexts on remote node stop.- Parameters:
nodeId- Remote node ID.
-
-