Class MergedReftable.MergedRefCursor
java.lang.Object
org.eclipse.jgit.internal.storage.reftable.RefCursor
org.eclipse.jgit.internal.storage.reftable.MergedReftable.MergedRefCursor
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
MergedReftable.FilteringMergedRefCursor
- Enclosing class:
MergedReftable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate MergedReftable.RefQueueEntry
private final PriorityQueue
<MergedReftable.RefQueueEntry> private Ref
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
void
close()
getRef()
Get reference at the current position.boolean
next()
Check if another reference is available.private MergedReftable.RefQueueEntry
poll()
void
seekPastPrefix
(String prefixName) Seeks forward to the first ref record lexicographically beyondprefixName
that doesn't start withprefixName
.private void
skipShadowedRefs
(String name) Methods inherited from class org.eclipse.jgit.internal.storage.reftable.RefCursor
wasDeleted
-
Field Details
-
queue
-
head
-
ref
-
-
Constructor Details
-
MergedRefCursor
MergedRefCursor()
-
-
Method Details
-
add
- Throws:
IOException
-
next
Description copied from class:RefCursor
Check if another reference is available.- Specified by:
next
in classRefCursor
- Returns:
true
if there is another result.- Throws:
IOException
- references cannot be read.
-
seekPastPrefix
Description copied from class:RefCursor
Seeks forward to the first ref record lexicographically beyondprefixName
that doesn't start withprefixName
. If there are no more results, skipping some refs won't add new results. E.g if we create a RefCursor that returns only results with a specific prefix, skipping that prefix won't give results that are not part of the original prefix.- Specified by:
seekPastPrefix
in classRefCursor
- Parameters:
prefixName
- prefix that should be skipped. All previous refs before it will be skipped.- Throws:
IOException
- references cannot be read.
-
poll
-
skipShadowedRefs
- Throws:
IOException
-
getRef
Description copied from class:RefCursor
Get reference at the current position. -
close
public void close()Description copied from class:RefCursor
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in classRefCursor
-