/** * Get data block for specified block index. * * @param blockIdx Block index. * @return Requested data block or {@code null} if nothing found. * @throws IgniteCheckedException If failed. */ @Nullable protected IgniteInternalFuture<byte[]> dataBlock(final long blockIdx) throws IgniteCheckedException { if (proxy) { assert secReader != null; final GridFutureAdapter<byte[]> fut = new GridFutureAdapter<>(); igfsCtx.runInIgfsThreadPool(new Runnable() { @Override public void run() { try { fut.onDone(igfsCtx.data().secondaryDataBlock(path, blockIdx, secReader, blockSize)); } catch (Throwable e) { fut.onDone(null, e); } } }); return fut; } else { assert fileInfo != null; return igfsCtx.data().dataBlock(fileInfo, path, blockIdx, secReader); } }
igfsCtx.data().dataBlock(info, path, blockIdx, reader);
/** * Get data block for specified block index. * * @param blockIdx Block index. * @return Requested data block or {@code null} if nothing found. * @throws IgniteCheckedException If failed. */ @Nullable protected IgniteInternalFuture<byte[]> dataBlock(final long blockIdx) throws IgniteCheckedException { if (proxy) { assert secReader != null; final GridFutureAdapter<byte[]> fut = new GridFutureAdapter<>(); igfsCtx.runInIgfsThreadPool(new Runnable() { @Override public void run() { try { fut.onDone(igfsCtx.data().secondaryDataBlock(path, blockIdx, secReader, blockSize)); } catch (Throwable e) { fut.onDone(null, e); } } }); return fut; } else { assert fileInfo != null; return igfsCtx.data().dataBlock(fileInfo, path, blockIdx, secReader); } }
igfsCtx.data().dataBlock(info, path, blockIdx, reader);