public class ServiceDisposalScheduler extends Object
| Constructor and Description |
|---|
ServiceDisposalScheduler() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize()
Creates a new scheduler on container startup
|
void |
scheduleForDisposal(DisposableReference<?> reference,
long delay)
Schedules a service instance for disposal if not used.
|
void |
terminate()
On container shutdown, immediately terminates all instantiated services that were scheduled for disposal.
|
@PostConstruct public void initialize()
@PreDestroy public void terminate()
public void scheduleForDisposal(DisposableReference<?> reference, long delay)
reference - a reference to service that will be disposed laterdelay - a delay which need to pass before the reference can be disposedCopyright © 2016 JBoss by Red Hat. All Rights Reserved.