java.lang.Object
org.eclipse.jgit.internal.util.CleanupService
A class that is registered as an OSGi service via the manifest. If JGit runs
in OSGi, OSGi will instantiate a singleton as soon as the bundle is activated
since this class is an immediate OSGi component with no dependencies. OSGi
will then call its
start() method. If JGit is not running in OSGi,
getInstance() will lazily create an instance.
An OSGi-created CleanupService will run the registered cleanup when
the org.eclipse.jgit bundle is deactivated. A lazily created instance
will register the cleanup as a JVM shutdown hook.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CleanupServiceObtains the singleton instance of theCleanupServicethat knows whether or not it is running on OSGi.
-
Constructor Details
-
CleanupService
public CleanupService()Public component constructor for OSGi DS. Do not call this explicitly! (Unfortunately this constructor must be public because of OSGi requirements.)
-
-
Method Details
-
getInstance
Obtains the singleton instance of theCleanupServicethat knows whether or not it is running on OSGi.- Returns:
- the
CleanupServicesingleton instance
-