/** * Constructs file output stream. * * @param igfsCtx IGFS context. * @param path Path to stored file. * @param bufSize The size of the buffer to be used. * @param batch Optional secondary file system batch. */ IgfsAbstractOutputStream(IgfsContext igfsCtx, IgfsPath path, int bufSize, @Nullable IgfsFileWorkerBatch batch) { synchronized (mux) { this.path = path; this.bufSize = optimizeBufferSize(bufSize); this.igfsCtx = igfsCtx; this.batch = batch; } igfsCtx.metrics().incrementFilesOpenedForWrite(); }
/** * Constructs file output stream. * * @param igfsCtx IGFS context. * @param path Path to stored file. * @param bufSize The size of the buffer to be used. * @param batch Optional secondary file system batch. */ IgfsAbstractOutputStream(IgfsContext igfsCtx, IgfsPath path, int bufSize, @Nullable IgfsFileWorkerBatch batch) { synchronized (mux) { this.path = path; this.bufSize = optimizeBufferSize(bufSize); this.igfsCtx = igfsCtx; this.batch = batch; } igfsCtx.metrics().incrementFilesOpenedForWrite(); }