public class DefaultOrphanedItemStrategy extends OrphanedItemStrategy
OrphanedItemStrategy
.
Trims dead items by the # of days or the # of builds much like LogRotator
.Modifier and Type | Class and Description |
---|---|
static class |
DefaultOrphanedItemStrategy.DescriptorImpl
Our
Descriptor |
Constructor and Description |
---|
DefaultOrphanedItemStrategy(boolean pruneDeadBranches,
String daysToKeepStr,
String numToKeepStr)
Stapler's constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getDaysToKeep()
Gets the number of days to keep dead branches.
|
String |
getDaysToKeepStr()
Returns the number of days to keep dead branches.
|
int |
getNumToKeep()
Gets the number of dead branches to keep.
|
String |
getNumToKeepStr()
Gets the number of dead branches to keep.
|
boolean |
isPruneDeadBranches()
Returns
true if dead branches should be removed. |
<I extends hudson.model.TopLevelItem> |
orphanedItems(ComputedFolder<I> owner,
Collection<I> orphaned,
hudson.model.TaskListener listener)
parameters and return value as in
ComputedFolder.orphanedItems(java.util.Collection<I>, hudson.model.TaskListener) |
getDescriptor
@DataBoundConstructor public DefaultOrphanedItemStrategy(boolean pruneDeadBranches, @CheckForNull String daysToKeepStr, @CheckForNull String numToKeepStr)
pruneDeadBranches
- remove dead branches.daysToKeepStr
- how old a branch must be to remove.numToKeepStr
- how many branches to keep.public int getDaysToKeep()
public int getNumToKeep()
public boolean isPruneDeadBranches()
true
if dead branches should be removed.true
if dead branches should be removed.@NonNull public String getDaysToKeepStr()
@NonNull public String getNumToKeepStr()
public <I extends hudson.model.TopLevelItem> Collection<I> orphanedItems(ComputedFolder<I> owner, Collection<I> orphaned, hudson.model.TaskListener listener) throws IOException, InterruptedException
OrphanedItemStrategy
ComputedFolder.orphanedItems(java.util.Collection<I>, hudson.model.TaskListener)
orphanedItems
in class OrphanedItemStrategy
IOException
InterruptedException
Copyright © 2016–2017. All rights reserved.