@Test public void testGetSegmentsDirectory() { final SwiftSegmentService service = new SwiftSegmentService(session, ".prefix/"); final Path container = new Path("test.cyberduck.ch", EnumSet.of(Path.Type.directory, Path.Type.volume)); final String name = UUID.randomUUID().toString(); final String key = UUID.randomUUID().toString() + "/" + name; assertEquals("/test.cyberduck.ch/.prefix/" + name + "/3", service.getSegmentsDirectory(new Path(container, key, EnumSet.of(Path.Type.file)), 3L).getAbsolute()); final Path directory = new Path(container, "dir", EnumSet.of(Path.Type.directory)); assertEquals("/test.cyberduck.ch/dir/.prefix/" + name + "/3", service.getSegmentsDirectory(new Path(directory, key, EnumSet.of(Path.Type.file)), 3L).getAbsolute()); }
public Path getSegmentsDirectory(final Path file, final Long size) { return new Path(file.getParent(), String.format("%s%s/%d", prefix, file.getName(), size), EnumSet.of(Path.Type.directory)); }
SwiftSegmentService { public Path getSegmentsDirectory(final Path file, final Long size) { return new Path(file.getParent(), String.format("%s%s/%d", prefix, file.getName(), size), EnumSet.of(Path.Type.directory)); } }
SwiftSegmentService { public Path getSegmentsDirectory(final Path file, final Long size) { return new Path(file.getParent(), String.format("%s%s/%d", prefix, file.getName(), size), EnumSet.of(Path.Type.directory)); } SwiftSegmentService(final SwiftSession session);  SwiftSegmentService(final SwiftSession session, final String prefix);  SwiftSegmentService(final SwiftSession session, final SwiftRegionService regionService);  SwiftSegmentService(final SwiftSession session, final SwiftRegionService regionService, final String prefix); }
SwiftSegmentService { public Path getSegmentsDirectory(final Path file, final Long size) { return new Path(file.getParent(), String.format("%s%s/%d", prefix, file.getName(), size), EnumSet.of(Path.Type.directory)); } SwiftSegmentService(final SwiftSession session);  SwiftSegmentService(final SwiftSession session, final String prefix);  SwiftSegmentService(final SwiftSession session, final SwiftRegionService regionService);  SwiftSegmentService(final SwiftSession session, final SwiftRegionService regionService, final String prefix); List<Path> list(final Path file); Path getSegmentsDirectory(final Path file, final Long size); Path getSegment(final Path file, final Long size, int segmentNumber); String manifest(final String container, final List<StorageObject> objects); Checksum checksum(final ChecksumCompute checksum, final List<StorageObject> objects); }
SwiftSegmentService { public Path getSegmentsDirectory(final Path file, final Long size) { return new Path(file.getParent(), String.format("%s%s/%d", prefix, file.getName(), size), EnumSet.of(Path.Type.directory)); } SwiftSegmentService(final SwiftSession session);  SwiftSegmentService(final SwiftSession session, final String prefix);  SwiftSegmentService(final SwiftSession session, final SwiftRegionService regionService);  SwiftSegmentService(final SwiftSession session, final SwiftRegionService regionService, final String prefix); List<Path> list(final Path file); Path getSegmentsDirectory(final Path file, final Long size); Path getSegment(final Path file, final Long size, int segmentNumber); String manifest(final String container, final List<StorageObject> objects); Checksum checksum(final ChecksumCompute checksum, final List<StorageObject> objects);  }