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

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


  }

  @Override
  public BitmapIndex getBitmapIndex() throws IOException {
    for (DfsPackFile pack : db.getPacks()) {
      PackBitmapIndex bitmapIndex = pack.getBitmapIndex(this);
      if (bitmapIndex != null)
        return new BitmapIndexImpl(bitmapIndex);
    }
    return null;
  }
View Full Code Here


  }

  public Collection<CachedPack> getCachedPacksAndUpdate(
    BitmapBuilder needBitmap) throws IOException {
    for (DfsPackFile pack : db.getPacks()) {
      PackBitmapIndex bitmapIndex = pack.getBitmapIndex(this);
      if (needBitmap.removeAllOrNone(bitmapIndex))
        return Collections.<CachedPack> singletonList(
            new DfsCachedPack(pack));
    }
    return Collections.emptyList();
View Full Code Here

  PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException {
    if (invalid || isGarbage())
      return null;
    DfsBlockCache.Ref<PackBitmapIndex> idxref = bitmapIndex;
    if (idxref != null) {
      PackBitmapIndex idx = idxref.get();
      if (idx != null)
        return idx;
    }

    if (!packDesc.hasFileExt(PackExt.BITMAP_INDEX))
      return null;

    synchronized (initLock) {
      idxref = bitmapIndex;
      if (idxref != null) {
        PackBitmapIndex idx = idxref.get();
        if (idx != null)
          return idx;
      }

      long size;
      PackBitmapIndex idx;
      try {
        ReadableChannel rc = ctx.db.openFile(packDesc, BITMAP_INDEX);
        try {
          InputStream in = Channels.newInputStream(rc);
          int wantSize = 8192;
View Full Code Here

  }

  @Override
  public BitmapIndex getBitmapIndex() throws IOException {
    for (DfsPackFile pack : db.getPacks()) {
      PackBitmapIndex bitmapIndex = pack.getBitmapIndex(this);
      if (bitmapIndex != null)
        return new BitmapIndexImpl(bitmapIndex);
    }
    return null;
  }
View Full Code Here

  }

  public Collection<CachedPack> getCachedPacksAndUpdate(
    BitmapBuilder needBitmap) throws IOException {
    for (DfsPackFile pack : db.getPacks()) {
      PackBitmapIndex bitmapIndex = pack.getBitmapIndex(this);
      if (needBitmap.removeAllOrNone(bitmapIndex))
        return Collections.<CachedPack> singletonList(
            new DfsCachedPack(pack));
    }
    return Collections.emptyList();
View Full Code Here

  PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException {
    if (invalid || isGarbage())
      return null;
    DfsBlockCache.Ref<PackBitmapIndex> idxref = bitmapIndex;
    if (idxref != null) {
      PackBitmapIndex idx = idxref.get();
      if (idx != null)
        return idx;
    }

    if (!packDesc.hasFileExt(PackExt.BITMAP_INDEX))
      return null;

    synchronized (initLock) {
      idxref = bitmapIndex;
      if (idxref != null) {
        PackBitmapIndex idx = idxref.get();
        if (idx != null)
          return idx;
      }

      long size;
      PackBitmapIndex idx;
      try {
        ReadableChannel rc = ctx.db.openFile(packDesc, BITMAP_INDEX);
        try {
          InputStream in = Channels.newInputStream(rc);
          int wantSize = 8192;
View Full Code Here

  }

  @Override
  public BitmapIndex getBitmapIndex() throws IOException {
    for (DfsPackFile pack : db.getPacks()) {
      PackBitmapIndex bitmapIndex = pack.getBitmapIndex(this);
      if (bitmapIndex != null)
        return new BitmapIndexImpl(bitmapIndex);
    }
    return null;
  }
View Full Code Here

  }

  public Collection<CachedPack> getCachedPacksAndUpdate(
    BitmapBuilder needBitmap) throws IOException {
    for (DfsPackFile pack : db.getPacks()) {
      PackBitmapIndex bitmapIndex = pack.getBitmapIndex(this);
      if (needBitmap.removeAllOrNone(bitmapIndex))
        return Collections.<CachedPack> singletonList(
            new DfsCachedPack(pack));
    }
    return Collections.emptyList();
View Full Code Here

TOP

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

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.