void close() { StorageSaver currentSaver; Storage currentStorage; ScheduledExecutorService currentExecutor; synchronized (this.monitor) { serviceRegistry = null; currentSaver = storageSaver; currentStorage = storage; currentExecutor = executor; } // do this outside of the lock to avoid deadlock currentSaver.close(); currentStorage.close(); // Must be done last since it will result in termination of the // framework active thread. currentExecutor.shutdown(); }
void close() { StorageSaver currentSaver; Storage currentStorage; ScheduledExecutorService currentExecutor; synchronized (this.monitor) { serviceRegistry = null; currentSaver = storageSaver; currentStorage = storage; currentExecutor = executor; } // do this outside of the lock to avoid deadlock currentSaver.close(); currentStorage.close(); // Must be done last since it will result in termination of the // framework active thread. currentExecutor.shutdown(); }
void close() { StorageSaver currentSaver; Storage currentStorage; ScheduledExecutorService currentExecutor; synchronized (this.monitor) { serviceRegistry = null; currentSaver = storageSaver; currentStorage = storage; currentExecutor = executor; } // do this outside of the lock to avoid deadlock currentSaver.close(); currentStorage.close(); // Must be done last since it will result in termination of the // framework active thread. currentExecutor.shutdown(); }
void close() { StorageSaver currentSaver; Storage currentStorage; ScheduledExecutorService currentExecutor; synchronized (this.monitor) { serviceRegistry = null; currentSaver = storageSaver; currentStorage = storage; currentExecutor = executor; } // do this outside of the lock to avoid deadlock currentSaver.close(); currentStorage.close(); // Must be done last since it will result in termination of the // framework active thread. currentExecutor.shutdown(); }
void close() { synchronized (this.monitor) { eventManager.close(); eventManager = null; eventPublisher = null; serviceRegistry = null; storageSaver.close(); storage.close(); // Must be done last since it will result in termination of the // framework active thread. executor.shutdown(); } }
void close() { synchronized (this.monitor) { eventManager.close(); eventManager = null; eventPublisher = null; serviceRegistry = null; storageSaver.close(); storage.close(); // Must be done last since it will result in termination of the // framework active thread. executor.shutdown(); } }