Class QueryContextRegistry


  • public class QueryContextRegistry
    extends Object
    Registry of all currently available query contexts.
    • Constructor Detail

      • QueryContextRegistry

        public QueryContextRegistry()
    • 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:
        True if 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.