ShutdownHook provides a means to register
Listeners that are run when JGit is uninstalled, either
| Modifier and Type | Class and Description |
|---|---|
| public static interface | ShutdownHook.
Object that needs to cleanup on shutdown. |
| Modifier and Type | Field and Description |
|---|---|
| public static final ShutdownHook | INSTANCE
Singleton |
| private final Set | |
| private static final Logger | |
| private final AtomicBoolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public boolean | Returns: true if a JGit shutdown is in progressWhether a JGit shutdown is in progress |
| private void | |
| public boolean | Returns: true if this object has been registeredthe object to call lListener#onShutdown on when JGit
shuts downRegister object that needs cleanup during JGit shutdown if it is not already registered. |
| public boolean | Returns: true if this object is no longer registeredthe object registered to be notified for cleanup when the JVM
shuts down lUnregister object that no longer needs cleanup during JGit shutdown if it is still registered. |
| public static ShutdownHook | |
| public static ShutdownHook[] |
| INSTANCE | back to summary |
|---|---|
| public static final ShutdownHook INSTANCE Singleton | |
| listeners | back to summary |
|---|---|
| private final Set<ShutdownHook. | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| shutdownInProgress | back to summary |
|---|---|
| private final AtomicBoolean shutdownInProgress | |
| ShutdownHook | back to summary |
|---|---|
| private ShutdownHook() | |
| cleanup | back to summary |
|---|---|
| private void cleanup() | |
| doCleanup | back to summary |
|---|---|
| private void doCleanup() | |
| isShutdownInProgress | back to summary |
|---|---|
| public boolean isShutdownInProgress() Whether a JGit shutdown is in progress
| |
| notify | back to summary |
|---|---|
| private void notify(ShutdownHook. | |
| register | back to summary |
|---|---|
| public boolean register(ShutdownHook. Register object that needs cleanup during JGit shutdown if it is not already registered. Registration is disabled when JGit shutdown is already in progress.
| |
| unregister | back to summary |
|---|---|
| public boolean unregister(ShutdownHook. Unregister object that no longer needs cleanup during JGit shutdown if it is still registered. Unregistration is disabled when JGit shutdown is already in progress.
| |
| valueOf | back to summary |
|---|---|
| public static ShutdownHook valueOf(String name) | |
| values | back to summary |
|---|---|
| public static ShutdownHook[] values() | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| onShutdown | back to summary |
|---|---|
| public void onShutdown() Cleanup resources when JGit is shut down. Implementations should be coded defensively
Runtime#addShutdownHook for more details.
| |