Class DfsReftableStack
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.dfs.DfsReftableStack
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class DfsReftableStack extends java.lang.Object implements java.lang.AutoCloseableTracks multiple openReftableReaderinstances.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<DfsReftable>filesprivate java.util.List<ReftableReader>tables
-
Constructor Summary
Constructors Modifier Constructor Description privateDfsReftableStack(int tableCnt)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.util.List<DfsReftable>files()Get unmodifiable list of DfsRefatble filesstatic DfsReftableStackopen(DfsReader ctx, java.util.List<DfsReftable> files)Opens a stack of tables for reading.java.util.List<ReftableReader>readers()Get unmodifiable list of tables
-
-
-
Field Detail
-
files
private final java.util.List<DfsReftable> files
-
tables
private final java.util.List<ReftableReader> tables
-
-
Method Detail
-
open
public static DfsReftableStack open(DfsReader ctx, java.util.List<DfsReftable> files) throws java.io.IOException
Opens a stack of tables for reading.- Parameters:
ctx- context to read the tables with. Thisctxwill be retained by the stack and each of the table readers.files- the tables to open.- Returns:
- stack reference to close the tables.
- Throws:
java.io.IOException- a table could not be opened
-
files
public java.util.List<DfsReftable> files()
Get unmodifiable list of DfsRefatble files- Returns:
- unmodifiable list of DfsRefatble files, in the same order the
files were passed to
open(DfsReader, List).
-
readers
public java.util.List<ReftableReader> readers()
Get unmodifiable list of tables- Returns:
- unmodifiable list of tables, in the same order the files were
passed to
open(DfsReader, List).
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-