public interface Disposable extends Serializable
dispose() is called periodically on the resource until
Disposable.State.PURGED is returned. Exception thrown by the method will be
kept and reported to the administrator.
Implementation should report success even in case the resource got disposed
externally. This is expected in case resource get disposed by administrator
after failed attempts was reported.
In case the resource is external to Jenkins and can survive Jenkins restart,
The implementation needs to be able to correctly locate the resource once deserialized.
As long as the Disposable is used by AsyncResourceDisposer only, it is
guaranteed to never run in more than one thread at a time.AsyncResourceDisposer.dispose(org.jenkinsci.plugins.resourcedisposer.Disposable...)| Modifier and Type | Interface and Description |
|---|---|
static class |
Disposable.State |
| Modifier and Type | Method and Description |
|---|---|
Disposable.State |
dispose()
Dispose the resource.
|
String |
getDisplayName()
Text description of the disposable.
|
@Nonnull Disposable.State dispose() throws Exception
Disposable.State.PURGED in case the resource do not need to be tracked any longer.Exception - Problem disposing the resource.Copyright © 2016. All rights reserved.