Class ReftableReflogReader
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.reftable.ReftableReflogReader
-
- All Implemented Interfaces:
ReflogReader
public class ReftableReflogReader extends Object implements ReflogReader
Implement the ReflogReader interface for a reflog stored in reftable.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReflogEntry
getLastEntry()
Get the last entry in the reflogList<ReflogEntry>
getReverseEntries()
Get all reflog entries in reverse orderList<ReflogEntry>
getReverseEntries(int max)
Get all reflog entries in reverse orderReflogEntry
getReverseEntry(int number)
Get specific entry in the reflog relative to the last entry which is considered entry zero.
-
-
-
Method Detail
-
getLastEntry
public ReflogEntry getLastEntry() throws IOException
Get the last entry in the reflog- Specified by:
getLastEntry
in interfaceReflogReader
- Returns:
- the latest reflog entry, or null if no log
- Throws:
IOException
-
getReverseEntries
public List<ReflogEntry> getReverseEntries() throws IOException
Get all reflog entries in reverse order- Specified by:
getReverseEntries
in interfaceReflogReader
- Returns:
- all reflog entries in reverse order
- Throws:
IOException
-
getReverseEntry
public ReflogEntry getReverseEntry(int number) throws IOException
Get specific entry in the reflog relative to the last entry which is considered entry zero.- Specified by:
getReverseEntry
in interfaceReflogReader
- Parameters:
number
- a int.- Returns:
- reflog entry or null if not found
- Throws:
IOException
-
getReverseEntries
public List<ReflogEntry> getReverseEntries(int max) throws IOException
Get all reflog entries in reverse order- Specified by:
getReverseEntries
in interfaceReflogReader
- Parameters:
max
- max number of entries to read- Returns:
- all reflog entries in reverse order
- Throws:
IOException
-
-