/** * Dispose of this factory, clean up shared resources */ @Override public void dispose() { for (ICacheServiceNonLocal<?, ?> service : this.csnlInstances.values()) { try { service.dispose(""); } catch (IOException e) { log.error("Could not dispose service " + service, e); } } this.csnlInstances.clear(); // TODO: shut down discovery listeners this.lTCPDLInstances.clear(); if (this.monitor != null) { this.monitor.notifyShutdown(); // this.monitor.join(5000); this.monitor = null; } }
service.dispose("");
/** * Synchronously dispose the cache. Not sure we want this. * <p> * @throws IOException */ @Override protected void processDispose() throws IOException { log.debug( "Disposing of lateral cache" ); ///* HELP: This section did nothing but generate compilation warnings. // TODO: may limit this functionality. It is dangerous. // asmuts -- Added functionality to help with warnings. I'm not getting // any. try { lateralCacheService.dispose( this.lateralCacheAttributes.getCacheName() ); // Should remove connection } catch ( Exception ex ) { log.error( "Couldn't dispose", ex ); handleException( ex, "Failed to dispose " + lateralCacheAttributes.getCacheName() ); } }
/** * Synchronously dispose the cache. Not sure we want this. * <p> * @throws IOException */ @Override protected void processDispose() throws IOException { log.debug( "Disposing of lateral cache" ); ///* HELP: This section did nothing but generate compilation warnings. // TODO: may limit this functionality. It is dangerous. // asmuts -- Added functionality to help with warnings. I'm not getting // any. try { lateralCacheService.dispose( this.lateralCacheAttributes.getCacheName() ); // Should remove connection } catch ( IOException ex ) { log.error( "Couldn't dispose", ex ); handleException( ex, "Failed to dispose " + lateralCacheAttributes.getCacheName() ); } }