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.AutoCloseable
Tracks multiple openReftableReader
instances.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<DfsReftable>
files
private java.util.List<ReftableReader>
tables
-
Constructor Summary
Constructors Modifier Constructor Description private
DfsReftableStack(int tableCnt)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.util.List<DfsReftable>
files()
Get unmodifiable list of DfsRefatble filesstatic DfsReftableStack
open(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. Thisctx
will 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:
close
in interfacejava.lang.AutoCloseable
-
-