|
||||||||||
| 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 |
getIndexName()
|
long |
getIndexSize()
|
long |
getLastModified()
|
long |
getObjectCount()
|
String |
getPackName()
|
long |
getPackSize()
|
PackWriter.Statistics |
getPackStats()
|
DfsRepositoryDescription |
getRepositoryDescription()
|
int |
getReverseIndexSize()
|
Set<ObjectId> |
getTips()
|
int |
hashCode()
|
DfsPackDescription |
setDeltaCount(long cnt)
|
DfsPackDescription |
setIndexSize(long bytes)
|
DfsPackDescription |
setLastModified(long timeMillis)
|
DfsPackDescription |
setObjectCount(long cnt)
|
DfsPackDescription |
setPackSize(long bytes)
|
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 and end with ".idx"
instead of ".pack". If this is not true implementors must extend the
class and override getIndexName().
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 getPackName()
public String getIndexName()
public long getLastModified()
public DfsPackDescription setLastModified(long timeMillis)
timeMillis - time the pack was created, in milliseconds. 0 if not known.
thispublic long getPackSize()
public DfsPackDescription setPackSize(long bytes)
bytes - size of the pack in bytes. If 0 the size is not known and will
be determined on first read.
thispublic long getIndexSize()
public DfsPackDescription setIndexSize(long bytes)
bytes - size of the index in bytes. If 0 the size is not known and
will be determined on first read.
thispublic int getReverseIndexSize()
public long getObjectCount()
public DfsPackDescription setObjectCount(long cnt)
cnt - number of objects in the pack.
thispublic long getDeltaCount()
public DfsPackDescription setDeltaCount(long cnt)
cnt - number of delta compressed objects in the pack.
thispublic Set<ObjectId> getTips()
public DfsPackDescription setTips(Set<ObjectId> tips)
tips - the tips of the pack, null if it has no known tips.
thispublic PackWriter.Statistics getPackStats()
public DfsPackDescription clearPackStats()
thispublic int hashCode()
hashCode in class Objectpublic boolean equals(Object b)
equals in class Objectpublic 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 | |||||||||