Top Description Inners Fields Constructors Methods
org.eclipse.jgit.internal.storage.commitgraph

public Class CommitGraphLoader

extends Object
Class Inheritance
Static Imports
org.eclipse.jgit.internal.storage.commitgraph.CommitGraphConstants.CHUNK_ID_BLOOM_FILTER_DATA, .CommitGraphConstants.CHUNK_ID_BLOOM_FILTER_INDEX, .CommitGraphConstants.CHUNK_ID_COMMIT_DATA, .CommitGraphConstants.CHUNK_ID_EXTRA_EDGE_LIST, .CommitGraphConstants.CHUNK_ID_OID_FANOUT, .CommitGraphConstants.CHUNK_ID_OID_LOOKUP, .CommitGraphConstants.CHUNK_LOOKUP_WIDTH, .CommitGraphConstants.COMMIT_GRAPH_MAGIC

The loader returns the representation of the commit-graph file content.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static CommitGraph

Returns:

a copy of the commit-graph file in memory
open
(File
existing commit-graph to read.
graphFile
)

Open an existing commit-graph file for reading.

public static CommitGraph

Returns:

a copy of the commit-graph file in memory
read
(InputStream
stream to read the commit-graph file from. The stream must be buffered as some small IOs are performed against the stream. The caller is responsible for closing the stream.
fd
)

Read an existing commit-graph file from a buffered stream.

public static CommitGraph

Returns:

a copy of the commit-graph file in memory
read
(InputStream
stream to read the commit-graph file from. The stream must be buffered as some small IOs are performed against the stream. The caller is responsible for closing the stream.
fd
,
boolean
enable reading bloom filter chunks.
readChangedPathFilters
)

Read an existing commit-graph file from a buffered stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Logger LOG

Constructor Detail

CommitGraphLoaderback to summary
public CommitGraphLoader()

Method Detail

openback to summary
public static CommitGraph open(File graphFile) throws FileNotFoundException, CommitGraphFormatException, IOException

Open an existing commit-graph file for reading.

The format of the file will be automatically detected and a proper access implementation for that format will be constructed and returned to the caller. The file may or may not be held open by the returned instance.

Parameters
graphFile:File

existing commit-graph to read.

Returns:CommitGraph

a copy of the commit-graph file in memory

Exceptions
FileNotFoundException:
the file does not exist.
CommitGraphFormatException:
commit-graph file's format is different from we expected.
IOException:
the file exists but could not be read due to security errors or unexpected data corruption.
readback to summary
public static CommitGraph read(InputStream fd) throws CommitGraphFormatException, IOException

Read an existing commit-graph file from a buffered stream.

The format of the file will be automatically detected and a proper access implementation for that format will be constructed and returned to the caller. The file may or may not be held open by the returned instance.

Parameters
fd:InputStream

stream to read the commit-graph file from. The stream must be buffered as some small IOs are performed against the stream. The caller is responsible for closing the stream.

Returns:CommitGraph

a copy of the commit-graph file in memory

Exceptions
CommitGraphFormatException:
the commit-graph file's format is different from we expected.
IOException:
the stream cannot be read.
readback to summary
public static CommitGraph read(InputStream fd, boolean readChangedPathFilters) throws CommitGraphFormatException, IOException

Read an existing commit-graph file from a buffered stream.

The format of the file will be automatically detected and a proper access implementation for that format will be constructed and returned to the caller. The file may or may not be held open by the returned instance.

Parameters
fd:InputStream

stream to read the commit-graph file from. The stream must be buffered as some small IOs are performed against the stream. The caller is responsible for closing the stream.

readChangedPathFilters:boolean

enable reading bloom filter chunks.

Returns:CommitGraph

a copy of the commit-graph file in memory

Exceptions
CommitGraphFormatException:
the commit-graph file's format is different from we expected.
IOException:
the stream cannot be read.
org.eclipse.jgit.internal.storage.commitgraph back to summary

private Class CommitGraphLoader.ChunkSegment

extends Object
Class Inheritance
  • java.lang.Object
  • org.eclipse.jgit.internal.storage.commitgraph.CommitGraphLoader.ChunkSegment

Field Summary

Modifier and TypeField and Description
pack-priv final int
pack-priv final long

Constructor Summary

AccessConstructor and Description
private
ChunkSegment(int id, long offset)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

idback to summary
pack-priv final int id
offsetback to summary
pack-priv final long offset

Constructor Detail

ChunkSegmentback to summary
private ChunkSegment(int id, long offset)