private void doWrite( StoreWriter writer, ByteBuffer temporaryBuffer, File file, int recordSize, ReadableByteChannel fileChannel, long fileSize, String storeCopyIdentifier, boolean isLogFile ) throws IOException { monitor.startStreamingStoreFile( file, storeCopyIdentifier ); String path = isLogFile ? file.getName() : relativePath( storeDirectory, file ); writer.write( path, fileChannel, temporaryBuffer, fileSize > 0, recordSize ); monitor.finishStreamingStoreFile( file, storeCopyIdentifier ); } }
private StoreResource toStoreResource( StoreFileMetadata storeFileMetadata ) throws IOException { File storeDir = neoStoreDataSource.getStoreDir(); File file = storeFileMetadata.file(); String relativePath = relativePath( storeDir, file ); return new StoreResource( file, relativePath, storeFileMetadata.recordSize(), pageCache, fileSystemAbstraction ); }
@Override public boolean next() throws IOException { if ( !files.hasNext() ) { resource = null; return false; } StoreFileMetadata md = files.next(); resource = new StoreResource( md.file(), relativePath( storeDir, md.file() ), md.recordSize(), pageCache, fs ); return true; }
new StoreResource( storeFileMetadata.file(), relativePath( storeDir, storeFileMetadata.file() ), storeFileMetadata.recordSize(), pageCache, fs ) );