Class DfsReftableStack

java.lang.Object
org.eclipse.jgit.internal.storage.dfs.DfsReftableStack
All Implemented Interfaces:
AutoCloseable

public class DfsReftableStack extends Object implements AutoCloseable
Tracks multiple open ReftableReader instances.
  • Field Details

  • Constructor Details

    • DfsReftableStack

      private DfsReftableStack(int tableCnt)
  • Method Details

    • open

      public static DfsReftableStack open(DfsReader ctx, List<DfsReftable> files) throws IOException
      Opens a stack of tables for reading.
      Parameters:
      ctx - context to read the tables with. This ctx 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:
      IOException - a table could not be opened
    • files

      public 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 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 interface AutoCloseable