@Test public void testDeleteBatch() { when(path.getFileSystem()).thenReturn(fileSystem); registryHelper.deleteBatch(path); verify(ioService, times(1)).startBatch(fileSystem); verify(ioService, times(1)).deleteIfExists(path); verify(ioService, times(1)).endBatch(); }
public void deleteBatch(final Path path) { try { ioService.startBatch(path.getFileSystem()); ioService.deleteIfExists(path); } finally { ioService.endBatch(); } }
VFSRegistryHelper { public void deleteBatch(final Path path) { try { ioService.startBatch(path.getFileSystem()); ioService.deleteIfExists(path); } finally { ioService.endBatch(); } } }
VFSRegistryHelper { public void deleteBatch(final Path path) { try { ioService.startBatch(path.getFileSystem()); ioService.deleteIfExists(path); } finally { ioService.endBatch(); } } VFSRegistryHelper(); @Inject  VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
                             final @Named("ioStrategy") IOService ioService,
                             final @Named("systemFS") FileSystem fileSystem); }
VFSRegistryHelper { public void deleteBatch(final Path path) { try { ioService.startBatch(path.getFileSystem()); ioService.deleteIfExists(path); } finally { ioService.endBatch(); } } VFSRegistryHelper(); @Inject  VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
                             final @Named("ioStrategy") IOService ioService,
                             final @Named("systemFS") FileSystem fileSystem); Path ensureDirectory(final String directory); String md5Hex(String content); void storeEntry(final Path path,
                           final Object value); Object readEntry(final Path path); List<Object> readEntries(final Path rootPath,
                                    final DirectoryStream.Filter<Path> filter); void writeBatch(final Path path,
                           final String content); void deleteBatch(final Path path); }
VFSRegistryHelper { public void deleteBatch(final Path path) { try { ioService.startBatch(path.getFileSystem()); ioService.deleteIfExists(path); } finally { ioService.endBatch(); } } VFSRegistryHelper(); @Inject  VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
                             final @Named("ioStrategy") IOService ioService,
                             final @Named("systemFS") FileSystem fileSystem); Path ensureDirectory(final String directory); String md5Hex(String content); void storeEntry(final Path path,
                           final Object value); Object readEntry(final Path path); List<Object> readEntries(final Path rootPath,
                                    final DirectoryStream.Filter<Path> filter); void writeBatch(final Path path,
                           final String content); void deleteBatch(final Path path);  }