@Override public void close() { currentElement = 0; elements.clear(); }
@Override public synchronized boolean isCaseSensitive() { if (!filesIncluded.isEmpty() || !dirsIncluded.isEmpty() || ticks++ > bound || System.currentTimeMillis() - start > 5000) { throw new Cancel(); } filesNotIncluded.clear(); dirsNotIncluded.clear(); // notFollowedSymlinks might be large, but probably unusual // scannedDirs will typically be largish, but seems to be needed return super.isCaseSensitive(); } };
@Override public synchronized void clear() { super.clear(); set.clear(); }
public void clearObservers() { observers.clear(); observerMap.clear(); }
/** * Clears request body. * * <p>This method must be overwritten by sub-classes that implement * alternative request content input methods</p> * * @since 2.0beta1 */ protected void clearRequestBody() { LOG.trace("enter PostMethod.clearRequestBody()"); this.params.clear(); super.clearRequestBody(); }
/** * Back patch a flow list. All instruction handles must be branch handles. */ public void backPatch(InstructionHandle target) { if (_elements != null) { final int n = _elements.size(); for (int i = 0; i < n; i++) { BranchHandle bh = (BranchHandle)_elements.elementAt(i); bh.setTarget(target); } _elements.clear(); // avoid backpatching more than once } }
@Override public void _parseDetails(ByteBuffer content) { int boxSize = content.remaining(); data = content.slice(); //Keep this in case we fail to parse successfulParse = false; try { tags.clear(); while (content.remaining() > 0) { XtraTag tag = new XtraTag(); tag.parse(content); tags.addElement(tag); } int calcSize = detailSize(); if (boxSize != calcSize) { throw new RuntimeException("Improperly handled Xtra tag: Calculated sizes don't match ( " + boxSize + "/" + calcSize + ")"); } successfulParse = true; } catch (Exception e) { successfulParse = false; LOG.error("Malformed Xtra Tag detected: {}", e.toString()); content.position(content.position() + content.remaining()); } finally { content.order(ByteOrder.BIG_ENDIAN); //Just in case we bailed out mid-parse we don't want to leave the byte order in MS land } }
curEndPos = position[1]; onChapterChanged(chapter); mLines.clear(); return 1;
_namespaceDecls.clear();
lines.clear();
public void cancelPage() { currentChapter = tempChapter; curBeginPos = tempBeginPos; curEndPos = curBeginPos; int ret = openBook(currentChapter, new int[]{curBeginPos, curEndPos}); if (ret == 0) { onLoadChapterFailure(currentChapter); return; } mLines.clear(); mLines = pageDown(); }
private void batchInsert() { try { db.run(tr -> { for (int i = 0; i < batchCount; ++i) { Tuple t = new Tuple(); for (Map.Entry<String, String> entry : StringByteIterator.getStringMap(batchValues.get(i)).entrySet()) { Tuple v = new Tuple(); v = v.add(entry.getKey()); v = v.add(entry.getValue()); t = t.add(v); } tr.set(Tuple.from(batchKeys.get(i)).pack(), t.pack()); } return null; }); } catch (FDBException e) { for (int i = 0; i < batchCount; ++i) { logger.error(MessageFormatter.format("Error batch inserting key {}", batchKeys.get(i)).getMessage(), e); } e.printStackTrace(); } catch (Throwable e) { for (int i = 0; i < batchCount; ++i) { logger.error(MessageFormatter.format("Error batch inserting key {}", batchKeys.get(i)).getMessage(), e); } e.printStackTrace(); } finally { batchKeys.clear(); batchValues.clear(); } }
@After public void tearDown() throws Exception { if (executor != null) { executor.shutdownNow(); } store.stop(); exceptions.clear(); }
/** * Get the filters in the filter set. * * @return a Vector of Filter instances. */ protected synchronized Vector<Filter> getFilters() { if (isReference()) { return getRef().getFilters(); } dieOnCircularReference(); // silly hack to avoid stack overflow... if (!readingFiles) { readingFiles = true; for (File filtersFile : filtersFiles) { readFiltersFromFile(filtersFile); } filtersFiles.clear(); readingFiles = false; } return filters; }
mLines.clear();