public ResourceIterator<StoreFileMetadata> listStoreFiles( boolean includeLogs ) throws IOException { NeoStoreFileListing.StoreFileListingBuilder fileListingBuilder = getNeoStoreFileListing().builder(); if ( !includeLogs ) { fileListingBuilder.excludeLogFiles(); } return fileListingBuilder.build(); }
@Test public void doNotListFilesFromAdditionalProviderThatRegisterTwice() throws IOException { NeoStoreFileListing neoStoreFileListing = neoStoreDataSource.getNeoStoreFileListing(); MarkerFileProvider provider = new MarkerFileProvider(); neoStoreFileListing.registerStoreFileProvider( provider ); neoStoreFileListing.registerStoreFileProvider( provider ); ResourceIterator<StoreFileMetadata> metadataResourceIterator = neoStoreFileListing.builder().build(); assertEquals( 1, metadataResourceIterator.stream().filter( metadata -> "marker".equals( metadata.file().getName() ) ).count() ); }
public ResourceIterator<StoreFileMetadata> listStoreFiles( boolean includeLogs ) throws IOException { NeoStoreFileListing.StoreFileListingBuilder fileListingBuilder = getNeoStoreFileListing().builder(); if ( !includeLogs ) { fileListingBuilder.excludeLogFiles(); } return fileListingBuilder.build(); }
@Override ResourceIterator<StoreFileMetadata> files( GetIndexFilesRequest request, NeoStoreDataSource neoStoreDataSource ) throws IOException { return neoStoreDataSource.getNeoStoreFileListing().getNeoStoreFileIndexListing().getSnapshot( request.indexId() ); } }
File[] listReplayableFiles() throws IOException { try ( Stream<StoreFileMetadata> stream = neoStoreDataSource.getNeoStoreFileListing().builder().excludeLogFiles() .excludeExplicitIndexStoreFiles().excludeSchemaIndexStoreFiles().excludeAdditionalProviders().build().stream() ) { return stream.filter( isCountFile().negate() ).map( StoreFileMetadata::file ).toArray( File[]::new ); } }
StoreResource[] getAtomicFilesSnapshot() throws IOException { ResourceIterator<StoreFileMetadata> neoStoreFilesIterator = closeablesListener.add( neoStoreDataSource.getNeoStoreFileListing().builder().excludeAll().includeNeoStoreFiles().build() ); ResourceIterator<StoreFileMetadata> indexIterator = closeablesListener.add( neoStoreDataSource .getNeoStoreFileListing() .builder() .excludeAll() .includeExplicitIndexStoreStoreFiles() .includeAdditionalProviders() .includeLabelScanStoreFiles() .includeSchemaIndexStoreFiles() .build() ); return Stream.concat( neoStoreFilesIterator.stream().filter( isCountFile() ), indexIterator.stream() ).map( mapToStoreResource() ).toArray( StoreResource[]::new ); }