Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.git.util

public Class GitHandlerRegistry

extends Object
Class Inheritance
Imports
java.nio.file.Path, java.util.Map, .Optional, java.util.concurrent.ConcurrentHashMap, org.jabref.logic.git.GitHandler, org.jabref.logic.git.preferences.GitPreferences, org.jspecify.annotations.NonNull

A registry that manages GitHandler instances per Git repository.

Ensures that each Git repository (identified by its root path) has a single GitHandler instance shared across the application.

Usage:

Field Summary

Modifier and TypeField and Description
private final GitPreferences
private final Map<Path, GitHandler>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Optional<GitHandler>
fromAnyPath(@NonNull Path anyPathInsideRepo)

public GitHandler
get(@NonNull Path repoPath)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

gitPreferencesback to summary
private final GitPreferences gitPreferences
handlerCacheback to summary
private final Map<Path, GitHandler> handlerCache

Constructor Detail

GitHandlerRegistryback to summary
public GitHandlerRegistry(GitPreferences gitPreferences)

Method Detail

fromAnyPathback to summary
public Optional<GitHandler> fromAnyPath(@NonNull Path anyPathInsideRepo)
getback to summary
public GitHandler get(@NonNull Path repoPath)