public interface RefCache
Within a single request that is known to read a small bounded number of refs, this class can be used to ensure a consistent view of one ref, and avoid multiple system calls to read refs multiple times.
Note: Implementations of this class are only appropriate for short-term caching, and do not support invalidation. It is also not threadsafe.
Modifier and Type | Method and Description |
---|---|
java.util.Optional<org.eclipse.jgit.lib.ObjectId> |
get(java.lang.String refName)
Get the possibly-cached value of a ref.
|
java.util.Optional<org.eclipse.jgit.lib.ObjectId> get(java.lang.String refName) throws java.io.IOException
refName
- name of the ref.ObjectId.zeroId()
.java.io.IOException