@Override public final boolean put(final O ioResult) throws IOException { if(ioResult == null) { // poison close(); return true; } return itemInfoOutput.put(ioResult.getItem().toString()); }
currTime = IoTask.START_OFFSET_MICROS + nanoTime() / 1000; if(currTime - nextFinishTime > delayMicroseconds) { item = nextIoResult.getItem(); if(markLimit > 0 && markLimit > markBuffer.size()) { markBuffer.add(nextIoResult); item = nextIoResult.getItem(); if(markBuffer.size() < markLimit) { markBuffer.add(nextIoResult);
@Override protected final void handleResponseHeaders(final O ioTask, final HttpHeaders respHeaders) { if(!fsAccess) { final String location = respHeaders.get(HttpHeaderNames.LOCATION); if(location != null && !location.isEmpty()) { if(location.startsWith(NS_URI_BASE)) { ioTask.getItem().setName(location.substring(NS_URI_BASE.length())); } else if(location.startsWith(OBJ_URI_BASE)) { ioTask.getItem().setName(location.substring(OBJ_URI_BASE.length())); } else { ioTask.getItem().setName(location); Loggers.ERR.warn("Unexpected location value: \"{}\"", location); } // set the paths to null to avoid the path calculation in the ioTaskCallback call ioTask.setSrcPath(null); ioTask.setDstPath(null); } } } }
@Override public final int put(final List<O> ioResults) throws IOException { final List<String> itemsInfo = new ArrayList<>(ioResults.size()); for(final O nextIoResult : ioResults) { if(nextIoResult == null) { // poison try { return itemInfoOutput.put(itemsInfo); } finally { close(); } } itemsInfo.add(nextIoResult.getItem().toString()); } return itemInfoOutput.put(itemsInfo); }
currTime = IoTask.START_OFFSET_MICROS + nanoTime() / 1000; if(currTime - nextFinishTime > delayMicroseconds) { buffer.add(nextIoResult.getItem()); if(markLimit > 0 && markLimit > markBuffer.size()) { markBuffer.add(nextIoResult); while(ioResultsIter.hasNext() && n < limit) { nextIoResult = ioResultsIter.next(); buffer.add(nextIoResult.getItem()); if(markLimit > 0 && markLimit > markBuffer.size()) { markBuffer.add(nextIoResult);
@Override public final int put(final List<O> ioResults, final int from, final int to) throws IOException { final int n = to - from; final List<String> itemsInfo = new ArrayList<>(n); O ioResult; for(int i = from; i < to; i ++) { ioResult = ioResults.get(i); if(ioResult == null) { // poison try { return itemInfoOutput.put(itemsInfo, 0, i); } finally { close(); } } itemsInfo.add(ioResult.getItem().toString()); } return itemInfoOutput.put(itemsInfo, 0, n); }
private boolean invokeDelete(final O ioTask) throws IOException { final String dstPath = ioTask.getDstPath(); final I fileItem = ioTask.getItem(); FS_PROVIDER.delete(dstPath == null ? Paths.get(fileItem.getName()) : Paths.get(dstPath, fileItem.getName())); return true; }
loadGenerator = generatorsMap.get(originCode); if(loadGenerator.isRecycling()) { latestIoResultsPerItem.put(ioTaskResult.getItem(), ioTaskResult); loadGenerator.recycle(ioTaskResult); } else if(ioResultsOutput != null) {
final LoadGenerator<I, O> loadGenerator = generatorsMap.get(originCode); if(loadGenerator.isRecycling()) { latestIoResultsPerItem.put(ioTaskResult.getItem(), ioTaskResult); loadGenerator.recycle(ioTaskResult); } else if(ioResultsOutput != null) {