public class GarbageCollectCommand extends GitCommand<java.util.Properties>
gc
command. It has setters for all
supported options and arguments of this command and a call()
method
to finally execute the command. Each instance of this class should only be
used for one invocation of the command (means: one call to call()
)repo
Modifier | Constructor and Description |
---|---|
protected |
GarbageCollectCommand(Repository repo) |
Modifier and Type | Method and Description |
---|---|
java.util.Properties |
call()
Executes the command
|
java.util.Properties |
getStatistics()
Computes and returns the repository statistics.
|
GarbageCollectCommand |
setExpire(java.util.Date expire)
During gc() or prune() each unreferenced, loose object which has been
created or modified after
expire will not be pruned. |
GarbageCollectCommand |
setProgressMonitor(ProgressMonitor monitor) |
checkCallable, getRepository, setCallable
protected GarbageCollectCommand(Repository repo)
repo
- public GarbageCollectCommand setProgressMonitor(ProgressMonitor monitor)
monitor
- a progress monitorpublic GarbageCollectCommand setExpire(java.util.Date expire)
expire
will not be pruned. Only
older objects may be pruned. If set to null then every object is a
candidate for pruning. Use GitDateParser
to parse time formats
used by git gc.expire
- minimal age of objects to be pruned.public java.util.Properties call() throws GitAPIException
GitCommand
call
in interface java.util.concurrent.Callable<java.util.Properties>
call
in class GitCommand<java.util.Properties>
GitAPIException
- or subclass thereof when an error occurspublic java.util.Properties getStatistics() throws GitAPIException
GitAPIException
- thrown if the repository statistics cannot be computedCopyright © 2013. All Rights Reserved.