package org.jenkinsci.plugins.p4.populate; import com.perforce.p4java.option.client.ParallelSyncOptions; import hudson.Extension; import hudson.model.AbstractDescribableImpl; import hudson.model.Descriptor; import org.kohsuke.stapler.DataBoundConstructor; import java.io.Serializable; public class ParallelSync extends AbstractDescribableImpl<ParallelSync> implements Serializable { private static final long serialVersionUID = 1L; private final boolean enable; private final String path; private final String threads; private final String minfiles; private final String minbytes; @DataBoundConstructor public ParallelSync(boolean enable, String path, String threads, String minfiles, String minbytes) { this.enable = enable; this.path = path; this.threads = threads; this.minfiles = minfiles; this.minbytes = minbytes; } public boolean isEnable() { return enable; } public String getPath() { return path; } public String getThreads() { return threads; } public String getMinfiles() { return minfiles; } public String getMinbytes() { return minbytes; } public ParallelSyncOptions getParallelOptions() { int threads = 0; int minfiles = 0; int minbytes = 0; try { threads = Integer.parseInt(this.threads); minfiles = Integer.parseInt(this.minfiles); minbytes = Integer.parseInt(this.minbytes); } catch (NumberFormatException e) { } ParallelSyncOptions opts = new ParallelSyncOptions(0, 0, minfiles, minbytes, threads, null); return opts; } @Extension public static class DescriptorImpl extends Descriptor<ParallelSync> { @Override public String getDisplayName() { return "Perforce Parallel Sync"; } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 22325 | Paul Allen | ReAdd 22116 - Enable P4Java parallel sync. | ||
#3 | 22126 | Paul Allen | Back out changelist 22116 - Parallel Sync (wait for p4java 17.2) | ||
#2 | 22116 | Paul Allen | Enable P4Java parallel sync. | ||
#1 | 21940 | Paul Allen | Branching using p4-jenkins | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/populate/ParallelSync.java | |||||
#2 | 19325 | Paul Allen |
ParallelSync needs to be Serializable JENKINS-29228 |
||
#1 | 19324 | Paul Allen |
Added Parallel Sync. An Advanced Populate option. Must specify the PATH to the ‘p4’ executable as parallel sync is not supported by p4java. JENKINS-29228 |