// This method generally should only be called by HubProvideFactory.removeHubRequestMonitor() public void destroy() { if (systemData != null) systemData.system.destroy(); synchronized (this) { if (createSystemFuture != null) createSystemFuture.cancel(true); if (queryOperation != null) queryOperation.cancel(); queryOperation = null; if (gracePeriodFuture != null) gracePeriodFuture.cancel(true); gracePeriodFuture = null; if (gracePeriodExpiredFuture != null) gracePeriodExpiredFuture.cancel(true); gracePeriodExpiredFuture = null; if (activateInterestOperation != null) activateInterestOperation.cancel(); activateInterestOperation = null; if (provider != null) provider.destroy(); provider = null; if (hubConfig != null) hubProvideFactory.removeHubConfig(hubConfig); hubConfig = null; if (hubRequestRequestor != null) hubRequestRequestor.destroy(); hubRequestRequestor = null; } }
public void handleGracePeriodExpired() { synchronized (this) { gracePeriodExpiredFuture = null; // if (requestProvided.get()) // return; // gracePeriodExpired.set(true); if (provider != null) { provider.destroy(); provider = null; } } hubProvideFactory.removeHubConfig(hubConfig); }