Package org.eclipse.jgit.internal.storage.file

Examples of org.eclipse.jgit.internal.storage.file.GC


import org.eclipse.jgit.lib.TextProgressMonitor;

class Gc extends TextBuiltin {
  @Override
  protected void run() throws Exception {
    GC gc = new GC((FileRepository) db);
    gc.setProgressMonitor(new TextProgressMonitor());
    gc.gc();
  }
View Full Code Here


  @Override
  public Properties call() throws GitAPIException {
    checkCallable();

    GC gc = new GC((FileRepository) repo);
    gc.setPackConfig(pconfig);
    gc.setProgressMonitor(monitor);
    if (this.expire != null)
      gc.setExpire(expire);

    try {
      gc.gc();
      return toProperties(gc.getStatistics());
    } catch (IOException e) {
      throw new JGitInternalException(JGitText.get().gcFailed, e);
    } catch (ParseException e) {
      throw new JGitInternalException(JGitText.get().gcFailed, e);
    }
View Full Code Here

   *             thrown if the repository statistics cannot be computed
   * @since 3.0
   */
  public Properties getStatistics() throws GitAPIException {
    try {
      GC gc = new GC((FileRepository) repo);
      return toProperties(gc.getStatistics());
    } catch (IOException e) {
      throw new JGitInternalException(
          JGitText.get().couldNotGetRepoStatistics, e);
    }
  }
View Full Code Here

   *            the git repository
   * @throws IOException
   */
  public static void packRefs(Repository repo, ProgressMonitor monitor) throws IOException {
    if (repo != null && repo instanceof FileRepository) {
      GC gc = new GC(((FileRepository) repo));
      gc.setProgressMonitor(monitor);
      gc.packRefs();
    }
  }
View Full Code Here

  @Override
  public Properties call() throws GitAPIException {
    checkCallable();

    GC gc = new GC((FileRepository) repo);
    gc.setProgressMonitor(monitor);
    if (this.expire != null)
      gc.setExpire(expire);

    try {
      gc.gc();
      return toProperties(gc.getStatistics());
    } catch (IOException e) {
      throw new JGitInternalException(JGitText.get().gcFailed, e);
    } catch (ParseException e) {
      throw new JGitInternalException(JGitText.get().gcFailed, e);
    }
View Full Code Here

   *             thrown if the repository statistics cannot be computed
   * @since 3.0
   */
  public Properties getStatistics() throws GitAPIException {
    try {
      GC gc = new GC((FileRepository) repo);
      return toProperties(gc.getStatistics());
    } catch (IOException e) {
      throw new JGitInternalException(
          JGitText.get().couldNotGetRepoStatistics, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.internal.storage.file.GC

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.