Class CleanupService

java.lang.Object
org.eclipse.jgit.internal.util.CleanupService

public final class CleanupService extends Object
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 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