Top Description Fields Constructors Methods
org.eclipse.jgit.internal.storage.dfs

public abstract Class DfsRepositoryBuilder<B extends DfsRepositoryBuilder, R extends DfsRepository>

extends BaseRepositoryBuilder<B extends DfsRepositoryBuilder, R extends DfsRepository>
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.internal.storage.dfs.InMemoryRepository.Builder
Type Parameters
<B>
type of the builder class.
<R>
type of the repository class.
Imports
java.io.File, .IOException, org.eclipse.jgit.internal.JGitText, org.eclipse.jgit.lib.BaseRepositoryBuilder

Constructs a org.eclipse.jgit.internal.storage.dfs.DfsRepository.

Field Summary

Modifier and TypeField and Description
private DfsReaderOptions
private DfsRepositoryDescription

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public B
addAlternateObjectDirectory(File
another objects directory to search after the standard one.
other
)

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.addAlternateObjectDirectory.

Add an alternate object directory to the search list.

public abstract R
build()

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.build.

Create a repository matching the configuration in this builder.

public DfsReaderOptions

Returns:

options used by readers accessing the repository.
getReaderOptions
()

Get options used by readers accessing the repository.

public DfsRepositoryDescription

Returns:

the description of the repository.
getRepositoryDescription
()

Get the description of the repository.

public B
setGitDir(File
GIT_DIR, the repository meta directory.
gitDir
)

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.setGitDir.

Set the Git directory storing the repository metadata.

public B
setIndexFile(File
GIT_INDEX_FILE, the index file location.
indexFile
)

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.setIndexFile.

Set the local index file that is caching checked out file status.

public B
setObjectDirectory(File
GIT_OBJECT_DIRECTORY, the directory where the repository's object files are stored.
objectDirectory
)

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.setObjectDirectory.

Set the directory storing the repository's objects.

public B

Returns:

this
setReaderOptions
(DfsReaderOptions
new reader options object.
opt
)

Set the reader options.

public B

Returns:

this
setRepositoryDescription
(DfsRepositoryDescription
new repository description object.
desc
)

Set the repository description.

public B
setup()

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.setup.

Guess and populate all parameters not already defined.

public B
setWorkTree(File
GIT_WORK_TREE, the working directory of the checkout.
workTree
)

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.setWorkTree.

Set the top level directory of the working files.

Inherited from org.eclipse.jgit.lib.BaseRepositoryBuilder:
addAlternateObjectDirectoriesaddAlternateObjectDirectoriesaddCeilingDirectoriesaddCeilingDirectoriesaddCeilingDirectoryfindGitDirfindGitDirgetAlternateObjectDirectoriesgetConfiggetFSgetGitCommonDirgetGitDirgetIndexFilegetInitialBranchgetObjectDirectorygetWorkTreeisBareisMustExistloadConfigreadEnvironmentreadEnvironmentrequireGitDirOrWorkTreesafeFSselfsetBaresetFSsetGitCommonDirsetInitialBranchsetMustExistsetupCommonDirsetupGitDirsetupInternalssetupWorkTree

Field Detail

readerOptionsback to summary
private DfsReaderOptions readerOptions
repoDescback to summary
private DfsRepositoryDescription repoDesc

Constructor Detail

DfsRepositoryBuilderback to summary
public DfsRepositoryBuilder()

Method Detail

addAlternateObjectDirectoryback to summary
public B addAlternateObjectDirectory(File other)

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.addAlternateObjectDirectory.

Doc from org.eclipse.jgit.lib.BaseRepositoryBuilder.addAlternateObjectDirectory.

Add an alternate object directory to the search list.

This setting handles one alternate directory at a time, and is provided to support GIT_ALTERNATE_OBJECT_DIRECTORIES.

Parameters
other:File

another objects directory to search after the standard one.

Returns:B

this (for chaining calls).

Annotations
@Override
buildback to summary
public abstract R build() throws IOException

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.build.

Doc from org.eclipse.jgit.lib.BaseRepositoryBuilder.build.

Create a repository matching the configuration in this builder.

If an option was not set, the build method will try to default the option based on other options. If insufficient information is available, an exception is thrown to the caller.

Create a repository matching the configuration in this builder.

If an option was not set, the build method will try to default the option based on other options. If insufficient information is available, an exception is thrown to the caller.

Returns:R

a repository matching this configuration. The caller is responsible to close the repository instance when it is no longer needed.

Annotations
@Override
Exceptions
IOException:
the repository could not be accessed to configure the rest of the builder's parameters.
getReaderOptionsback to summary
public DfsReaderOptions getReaderOptions()

Get options used by readers accessing the repository.

Returns:DfsReaderOptions

options used by readers accessing the repository.

getRepositoryDescriptionback to summary
public DfsRepositoryDescription getRepositoryDescription()

Get the description of the repository.

Returns:DfsRepositoryDescription

the description of the repository.

setGitDirback to summary
public B setGitDir(File gitDir)

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.setGitDir.

Doc from org.eclipse.jgit.lib.BaseRepositoryBuilder.setGitDir.

Set the Git directory storing the repository metadata.

The meta directory stores the objects, references, and meta files like MERGE_HEAD, or the index file. If null the path is assumed to be workTree/.git.

Parameters
gitDir:File

GIT_DIR, the repository meta directory.

Returns:B

this (for chaining calls).

Annotations
@Override
setIndexFileback to summary
public B setIndexFile(File indexFile)

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.setIndexFile.

Doc from org.eclipse.jgit.lib.BaseRepositoryBuilder.setIndexFile.

Set the local index file that is caching checked out file status.

The location of the index file tracking the status information for each checked out file in workTree. This may be null to assume the default gitDiir/index.

Parameters
indexFile:File

GIT_INDEX_FILE, the index file location.

Returns:B

this (for chaining calls).

Annotations
@Override
setObjectDirectoryback to summary
public B setObjectDirectory(File objectDirectory)

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.setObjectDirectory.

Doc from org.eclipse.jgit.lib.BaseRepositoryBuilder.setObjectDirectory.

Set the directory storing the repository's objects.

Parameters
objectDirectory:File

GIT_OBJECT_DIRECTORY, the directory where the repository's object files are stored.

Returns:B

this (for chaining calls).

Annotations
@Override
setReaderOptionsback to summary
public B setReaderOptions(DfsReaderOptions opt)

Set the reader options.

Parameters
opt:DfsReaderOptions

new reader options object.

Returns:B

this

setRepositoryDescriptionback to summary
public B setRepositoryDescription(DfsRepositoryDescription desc)

Set the repository description.

Parameters
desc:DfsRepositoryDescription

new repository description object.

Returns:B

this

setupback to summary
public B setup() throws IllegalArgumentException, IOException

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.setup.

Doc from org.eclipse.jgit.lib.BaseRepositoryBuilder.setup.

Guess and populate all parameters not already defined.

If an option was not set, the setup method will try to default the option based on other options. If insufficient information is available, an exception is thrown to the caller.

Returns:B

this

Annotations
@Override
Exceptions
IllegalArgumentException:
insufficient parameters were set, or some parameters are incompatible with one another.
IOException:
the repository could not be accessed to configure the rest of the builder's parameters.
setWorkTreeback to summary
public B setWorkTree(File workTree)

Overrides org.eclipse.jgit.lib.BaseRepositoryBuilder.setWorkTree.

Doc from org.eclipse.jgit.lib.BaseRepositoryBuilder.setWorkTree.

Set the top level directory of the working files.

Parameters
workTree:File

GIT_WORK_TREE, the working directory of the checkout.

Returns:B

this (for chaining calls).

Annotations
@Override