|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jgit.storage.dfs.DfsPackDescription
public class DfsPackDescription
Description of a DFS stored pack/index file.
Implementors may extend this class and add additional data members.
Instances of this class are cached with the DfsPackFile, and should not be modified once initialized and presented to the JGit DFS library.
Constructor Summary | |
---|---|
DfsPackDescription(DfsRepositoryDescription repoDesc,
String name)
Initialize a description by pack name and repository. |
Method Summary | |
---|---|
DfsPackDescription |
clearPackStats()
Discard the pack statistics, if it was populated. |
int |
compareTo(DfsPackDescription b)
Sort packs according to the optimal lookup ordering. |
boolean |
equals(Object b)
|
long |
getDeltaCount()
|
String |
getFileName(PackExt ext)
|
long |
getFileSize(PackExt ext)
|
long |
getLastModified()
|
long |
getObjectCount()
|
DfsObjDatabase.PackSource |
getPackSource()
|
PackWriter.Statistics |
getPackStats()
|
DfsRepositoryDescription |
getRepositoryDescription()
|
Set<ObjectId> |
getTips()
|
int |
hashCode()
|
DfsPackDescription |
setDeltaCount(long cnt)
|
DfsPackDescription |
setFileSize(PackExt ext,
long bytes)
|
DfsPackDescription |
setLastModified(long timeMillis)
|
DfsPackDescription |
setObjectCount(long cnt)
|
DfsPackDescription |
setPackSource(DfsObjDatabase.PackSource source)
|
DfsPackDescription |
setTips(Set<ObjectId> tips)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DfsPackDescription(DfsRepositoryDescription repoDesc, String name)
The corresponding index file is assumed to exist. If this is not true
implementors must extend the class and override
getFileName(PackExt)
.
Callers should also try to fill in other fields if they are reasonably free to access at the time this instance is being initialized.
name
- name of the pack file. Must end with ".pack".repoDesc
- description of the repo containing the pack file.Method Detail |
---|
public DfsRepositoryDescription getRepositoryDescription()
public String getFileName(PackExt ext)
ext
- the file extension
public DfsObjDatabase.PackSource getPackSource()
public DfsPackDescription setPackSource(DfsObjDatabase.PackSource source)
source
- the source of the pack.
this
public long getLastModified()
public DfsPackDescription setLastModified(long timeMillis)
timeMillis
- time the pack was created, in milliseconds. 0 if not known.
this
public DfsPackDescription setFileSize(PackExt ext, long bytes)
ext
- the file extension.bytes
- size of the file in bytes. If 0 the file is not known and will
be determined on first read.
this
public long getFileSize(PackExt ext)
ext
- the file extension.
public long getObjectCount()
public DfsPackDescription setObjectCount(long cnt)
cnt
- number of objects in the pack.
this
public long getDeltaCount()
public DfsPackDescription setDeltaCount(long cnt)
cnt
- number of delta compressed objects in the pack.
this
public Set<ObjectId> getTips()
public DfsPackDescription setTips(Set<ObjectId> tips)
tips
- the tips of the pack, null if it has no known tips.
this
public PackWriter.Statistics getPackStats()
public DfsPackDescription clearPackStats()
this
public int hashCode()
hashCode
in class Object
public boolean equals(Object b)
equals
in class Object
public int compareTo(DfsPackDescription b)
This method tries to position packs in the order readers should examine them when looking for objects by SHA-1. The default tries to sort packs with more recent modification dates before older packs, and packs with fewer objects before packs with more objects.
compareTo
in interface Comparable<DfsPackDescription>
b
- the other pack.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |