Associates the current thread with queryId.
(TUniqueId queryId)
| 72 | * Associates the current thread with queryId. |
| 73 | */ |
| 74 | public static Registration register(TUniqueId queryId) { |
| 75 | if (queryId == null) return null; |
| 76 | LOG.trace("register {}", PrintId(queryId)); |
| 77 | cancelled_.set(new AtomicBoolean(false)); |
| 78 | queryThreads_.put(queryId, new Pair<>(Thread.currentThread(), cancelled_.get())); |
| 79 | return new Registration(queryId); |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Cancels thread associated with queryId. |