| | |
| | | purger.initiateShutdown(); |
| | | } |
| | | |
| | | // wait for shutdown of the threads holding cursors |
| | | try |
| | | { |
| | | if (indexer != null) |
| | | { |
| | | indexer.join(); |
| | | } |
| | | if (purger != null) |
| | | { |
| | | purger.join(); |
| | | } |
| | | } |
| | | catch (InterruptedException e) |
| | | { |
| | | // do nothing: we are already shutting down |
| | | } |
| | | |
| | | // now we can safely shutdown all DBs |
| | | try |
| | | { |
| | | shutdownChangeNumberIndexDB(); |
| | |
| | | { |
| | | firstException = e; |
| | | } |
| | | |
| | | for (Iterator<ConcurrentMap<Integer, FileReplicaDB>> it = |
| | | this.domainToReplicaDBs.values().iterator(); it.hasNext();) |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (replicationEnv != null) |
| | | { |
| | | // wait for shutdown of the threads holding cursors |
| | | try |
| | | { |
| | | if (indexer != null) |
| | | { |
| | | indexer.join(); |
| | | } |
| | | if (purger != null) |
| | | { |
| | | purger.join(); |
| | | } |
| | | } |
| | | catch (InterruptedException e) |
| | | { |
| | | // do nothing: we are already shutting down |
| | | } |
| | | |
| | | replicationEnv.shutdown(); |
| | | } |
| | | |