public class DfsCachedPack extends CachedPack
| Modifier and Type | Method and Description | 
|---|---|
long | 
getDeltaCount()
Get the number of delta objects stored in this pack. 
 | 
long | 
getObjectCount()
Get the number of objects in this pack. 
 | 
DfsPackDescription | 
getPackDescription()
Get the description of the pack. 
 | 
boolean | 
hasObject(ObjectToPack obj,
         StoredObjectRepresentation rep)
Determine if this pack contains the object representation given. 
 | 
public DfsPackDescription getPackDescription()
public long getObjectCount()
                    throws IOException
getObjectCount in class CachedPackIOException - if the object count cannot be read.public long getDeltaCount()
                   throws IOException
 This is an optional method, not every cached pack storage system knows
 the precise number of deltas stored within the pack. This number must be
 smaller than CachedPack.getObjectCount() as deltas are not supposed to span
 across pack files.
 
This method must be fast, if the only way to determine delta counts is to scan the pack file's contents one object at a time, implementors should return 0 and avoid the high cost of the scan.
getDeltaCount in class CachedPackIOException - if the delta count cannot be read.public boolean hasObject(ObjectToPack obj, StoredObjectRepresentation rep)
PackWriter uses this method during the finding sources phase to prune away any objects from the leading thin-pack that already appear within this pack and should not be sent twice.
 Implementors are strongly encouraged to rely on looking at rep
 only and using its internal state to decide if this object is within this
 pack. Implementors should ensure a representation from this cached pack
 is tested as part of
 ObjectReuseAsIs.selectObjectRepresentation(PackWriter, org.eclipse.jgit.lib.ProgressMonitor, Iterable)
 , ensuring this method would eventually return true if the object would
 be included by this cached pack.
hasObject in class CachedPackobj - the object being packed. Can be used as an ObjectId.rep - representation from the
            ObjectReuseAsIs
            instance that originally supplied this CachedPack.Copyright © 2020 Eclipse JGit Project. All rights reserved.