org.eclipse.jgit.storage.dht
Class DhtReader
java.lang.Object
org.eclipse.jgit.lib.ObjectReader
org.eclipse.jgit.storage.dht.DhtReader
- All Implemented Interfaces:
- ObjectReuseAsIs
public class DhtReader
- extends ObjectReader
- implements ObjectReuseAsIs
ObjectReader implementation for DHT based repositories.
This class is public only to expose its unique statistics for runtime
performance reporting. Applications should always prefer to use the more
generic base class, ObjectReader
.
Nested Class Summary |
static class |
DhtReader.Statistics
How this DhtReader has performed since creation. |
Method Summary |
void |
copyObjectAsIs(PackOutputStream out,
ObjectToPack otp,
boolean validate)
|
void |
copyPackAsIs(PackOutputStream out,
CachedPack pack,
boolean validate)
|
java.util.Collection<CachedPack> |
getCachedPacks()
|
long |
getObjectSize(AnyObjectId objectId,
int typeHint)
|
|
getObjectSize(java.lang.Iterable<T> objectIds,
boolean reportMissing)
|
DhtReader.Statistics |
getStatistics()
|
boolean |
has(AnyObjectId objId,
int typeHint)
|
org.eclipse.jgit.storage.dht.DhtObjectToPack |
newObjectToPack(RevObject obj)
|
ObjectReader |
newReader()
|
ObjectLoader |
open(AnyObjectId objId,
int typeHint)
|
|
open(java.lang.Iterable<T> objectIds,
boolean reportMissing)
|
void |
release()
|
java.util.Collection<ObjectId> |
resolve(AbbreviatedObjectId id)
|
void |
selectObjectRepresentation(PackWriter packer,
ProgressMonitor monitor,
java.lang.Iterable<ObjectToPack> objects)
|
void |
walkAdviceBeginCommits(RevWalk rw,
java.util.Collection<RevCommit> roots)
|
void |
walkAdviceBeginTrees(ObjectWalk ow,
RevCommit min,
RevCommit max)
|
void |
walkAdviceEnd()
|
void |
writeObjects(PackOutputStream out,
java.util.List<ObjectToPack> objects)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getStatistics
public DhtReader.Statistics getStatistics()
- Returns:
- describes how this DhtReader has performed.
release
public void release()
- Overrides:
release
in class ObjectReader
newReader
public ObjectReader newReader()
- Specified by:
newReader
in class ObjectReader
has
public boolean has(AnyObjectId objId,
int typeHint)
throws java.io.IOException
- Overrides:
has
in class ObjectReader
- Throws:
java.io.IOException
open
public ObjectLoader open(AnyObjectId objId,
int typeHint)
throws MissingObjectException,
IncorrectObjectTypeException,
java.io.IOException
- Specified by:
open
in class ObjectReader
- Throws:
MissingObjectException
IncorrectObjectTypeException
java.io.IOException
open
public <T extends ObjectId> AsyncObjectLoaderQueue<T> open(java.lang.Iterable<T> objectIds,
boolean reportMissing)
- Overrides:
open
in class ObjectReader
getObjectSize
public long getObjectSize(AnyObjectId objectId,
int typeHint)
throws MissingObjectException,
IncorrectObjectTypeException,
java.io.IOException
- Overrides:
getObjectSize
in class ObjectReader
- Throws:
MissingObjectException
IncorrectObjectTypeException
java.io.IOException
getObjectSize
public <T extends ObjectId> AsyncObjectSizeQueue<T> getObjectSize(java.lang.Iterable<T> objectIds,
boolean reportMissing)
- Overrides:
getObjectSize
in class ObjectReader
walkAdviceBeginCommits
public void walkAdviceBeginCommits(RevWalk rw,
java.util.Collection<RevCommit> roots)
throws java.io.IOException
- Overrides:
walkAdviceBeginCommits
in class ObjectReader
- Throws:
java.io.IOException
walkAdviceBeginTrees
public void walkAdviceBeginTrees(ObjectWalk ow,
RevCommit min,
RevCommit max)
throws java.io.IOException
- Overrides:
walkAdviceBeginTrees
in class ObjectReader
- Throws:
java.io.IOException
walkAdviceEnd
public void walkAdviceEnd()
- Overrides:
walkAdviceEnd
in class ObjectReader
resolve
public java.util.Collection<ObjectId> resolve(AbbreviatedObjectId id)
throws java.io.IOException
- Specified by:
resolve
in class ObjectReader
- Throws:
java.io.IOException
newObjectToPack
public org.eclipse.jgit.storage.dht.DhtObjectToPack newObjectToPack(RevObject obj)
- Specified by:
newObjectToPack
in interface ObjectReuseAsIs
selectObjectRepresentation
public void selectObjectRepresentation(PackWriter packer,
ProgressMonitor monitor,
java.lang.Iterable<ObjectToPack> objects)
throws java.io.IOException,
MissingObjectException
- Specified by:
selectObjectRepresentation
in interface ObjectReuseAsIs
- Throws:
java.io.IOException
MissingObjectException
writeObjects
public void writeObjects(PackOutputStream out,
java.util.List<ObjectToPack> objects)
throws java.io.IOException
- Specified by:
writeObjects
in interface ObjectReuseAsIs
- Throws:
java.io.IOException
copyObjectAsIs
public void copyObjectAsIs(PackOutputStream out,
ObjectToPack otp,
boolean validate)
throws java.io.IOException,
StoredObjectRepresentationNotAvailableException
- Specified by:
copyObjectAsIs
in interface ObjectReuseAsIs
- Throws:
java.io.IOException
StoredObjectRepresentationNotAvailableException
getCachedPacks
public java.util.Collection<CachedPack> getCachedPacks()
throws java.io.IOException
- Specified by:
getCachedPacks
in interface ObjectReuseAsIs
- Throws:
java.io.IOException
copyPackAsIs
public void copyPackAsIs(PackOutputStream out,
CachedPack pack,
boolean validate)
throws java.io.IOException
- Specified by:
copyPackAsIs
in interface ObjectReuseAsIs
- Throws:
java.io.IOException
Copyright © 2011. All Rights Reserved.