@Test public void testGetSegmentName() { final SwiftSegmentService service = new SwiftSegmentService(session, ".prefix/"); final Path container = new Path("test.cyberduck.ch", EnumSet.of(Path.Type.directory, Path.Type.volume)); final Path directory = new Path(container, "dir", EnumSet.of(Path.Type.directory)); final String name = "name"; final String key = "sub/" + name; assertEquals("/test.cyberduck.ch/dir/.prefix/name/1/00000001", service.getSegment(new Path(directory, key, EnumSet.of(Path.Type.file)), 1L, 1).getAbsolute()); }
public Path getSegment(final Path file, final Long size, int segmentNumber) { return new Path(this.getSegmentsDirectory(file, size), String.format("%08d", segmentNumber), EnumSet.of(Path.Type.file)); }
SwiftSegmentService { public Path getSegment(final Path file, final Long size, int segmentNumber) { return new Path(this.getSegmentsDirectory(file, size), String.format("%08d", segmentNumber), EnumSet.of(Path.Type.file)); } }
SwiftSegmentService { public Path getSegment(final Path file, final Long size, int segmentNumber) { return new Path(this.getSegmentsDirectory(file, size), String.format("%08d", segmentNumber), EnumSet.of(Path.Type.file)); } 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 getSegment(final Path file, final Long size, int segmentNumber) { return new Path(this.getSegmentsDirectory(file, size), String.format("%08d", segmentNumber), EnumSet.of(Path.Type.file)); } 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 getSegment(final Path file, final Long size, int segmentNumber) { return new Path(this.getSegmentsDirectory(file, size), String.format("%08d", segmentNumber), EnumSet.of(Path.Type.file)); } 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);  }