void clear(Deque<T> dq) { synchronized (dq) { dq.clear(); } }
void clear(Deque<T> dq) { synchronized (dq) { dq.clear(); } }
/** * Reset the statement parameter queue, the rows affected cache, * and the execution count. */ public void reset() { this.parameterQueue.clear(); this.rowsAffected.clear(); }
public synchronized void clear() { chunks.clear(); chunkCursor = 0; } }
@Override public void beginTree(DetailAST rootAST) { // clear data parameterNamesStack.clear(); parameterNames = Collections.emptySet(); }
@Override public void setNestedPath(@Nullable String nestedPath) { doSetNestedPath(nestedPath); this.nestedPathStack.clear(); }
/** * * Clear the stored history of sent records, consumer group offsets, and transactional state */ public synchronized void clear() { this.sent.clear(); this.uncommittedSends.clear(); this.completions.clear(); this.consumerGroupOffsets.clear(); this.uncommittedConsumerGroupOffsets.clear(); this.transactionInitialized = false; this.transactionInFlight = false; this.transactionCommitted = false; this.transactionAborted = false; this.producerFenced = false; }
@Override public void close() throws Exception { super.close(); sessionIds.clear(); sessionIdsPerSnapshot.clear(); }
@Override public void setNestedPath(@Nullable String nestedPath) { doSetNestedPath(nestedPath); this.nestedPathStack.clear(); }
@Override public void reset() { getUsedHistoryQueue().clear(); if (logger.isDebugEnabled()) { logger.debug("reset data source used history"); } } }
/** Resets internal lists of active trace sections. */ @Resetter public static void reset() { synchronized (lock) { currentSections.clear(); previousSections.clear(); } crashOnIncorrectUsage = CRASH_ON_INCORRECT_USAGE_DEFAULT; } }
@Override public void beginTree(DetailAST rootAST) { context = new Context(false); contextStack.clear(); }
@Override public void clear() { assertTrue(Thread.holdsLock(mutex)); delegate.clear(); }
private void handleException(Exception e) { handshaking = false; buffered.clear(); Handler<Throwable> handler = exceptionHandler(); if (handler != null) { context.executeFromIO(v -> { handler.handle(e); }); } else { log.error("Error in websocket handshake", e); } }
@Override public void beginTree(DetailAST ast) { handlerFactory.clearCreatedHandlers(); handlers.clear(); final PrimordialHandler primordialHandler = new PrimordialHandler(this); handlers.push(primordialHandler); primordialHandler.checkIndentation(); incorrectIndentationLines = new HashSet<>(); }
@Test(dataProvider = "empty") public void clear_whenEmpty(Deque<?> deque) { deque.clear(); assertThat(deque, is(deeplyEmpty())); }
@Test(dataProvider = "full") public void clear_whenPopulated(Deque<?> deque) { deque.clear(); assertThat(deque, is(deeplyEmpty())); }
@Override protected SpelExpression doParseExpression(String expressionString, @Nullable ParserContext context) throws ParseException { try { this.expressionString = expressionString; Tokenizer tokenizer = new Tokenizer(expressionString); this.tokenStream = tokenizer.process(); this.tokenStreamLength = this.tokenStream.size(); this.tokenStreamPointer = 0; this.constructedNodes.clear(); SpelNodeImpl ast = eatExpression(); Assert.state(ast != null, "No node"); Token t = peekToken(); if (t != null) { throw new SpelParseException(t.startPos, SpelMessage.MORE_INPUT, toString(nextToken())); } Assert.isTrue(this.constructedNodes.isEmpty(), "At least one node expected"); return new SpelExpression(expressionString, ast, this.configuration); } catch (InternalParseException ex) { throw ex.getCause(); } }