SOLR-6954: Remove deprecated SolrClient.shutdown() method from trunk

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1655277 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alan Woodward 2015-01-28 12:28:18 +00:00
parent 3018576b67
commit 92491f2472
8 changed files with 9 additions and 50 deletions

View File

@ -43,6 +43,8 @@ Upgrading from Solr 5.x
* The deprecated <nrtMode> configuration in solrconfig.xml has been removed.
Please remove it from solrconfig.xml.
* SolrClient.shutdown() has been removed, use SolrClient.close() instead.
Detailed Change List
----------------------
@ -58,6 +60,8 @@ Other Changes
tests to allow for multiple tests without the same class.
(Ramkumar Aiyengar, Erick Erickson, Mike McCandless)
* SOLR-6954: Deprecated SolrClient.shutdown() method removed (Alan Woodward)
================== 5.1.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release

View File

@ -212,15 +212,9 @@ public class EmbeddedSolrServer extends SolrClient
/**
* Shutdown all cores within the EmbeddedSolrServer instance
*/
@Override
@Deprecated
public void shutdown() {
coreContainer.shutdown();
}
@Override
public void close() throws IOException {
shutdown();
coreContainer.shutdown();
}
/**

View File

@ -85,9 +85,6 @@ public class MockStreamingSolrClients extends StreamingSolrClients {
return solrClient.request(request);
}
@Override
public void shutdown() { }
@Override
public void close() {}

View File

@ -400,17 +400,4 @@ public abstract class SolrClient implements Serializable, Closeable {
return binder;
}
/**
* Release allocated resources.
*
* @since solr 4.0
* @deprecated Use close() instead.
*/
@Deprecated
public abstract void shutdown();
//@SuppressWarnings("deprecation")
public void close() throws IOException {
shutdown();
}
}

View File

@ -1033,12 +1033,6 @@ public class CloudSolrClient extends SolrClient {
@Override
public void close() throws IOException {
shutdown();
}
@Override
@Deprecated
public void shutdown() {
if (zkStateReader != null) {
synchronized(this) {
if (zkStateReader!= null)
@ -1048,7 +1042,7 @@ public class CloudSolrClient extends SolrClient {
}
if (shutdownLBHttpSolrServer) {
lbClient.shutdown();
lbClient.close();
}
if (clientIsInternal && myClient!=null) {

View File

@ -36,6 +36,7 @@ import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.params.UpdateParams;
import org.apache.solr.common.util.IOUtils;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SolrjNamedThreadFactory;
import org.slf4j.Logger;
@ -425,13 +426,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
@Override
public void close() {
shutdown();
}
@Override
@Deprecated
public void shutdown() {
client.shutdown();
IOUtils.closeQuietly(client);
if (shutdownExecutor) {
scheduler.shutdown();
try {
@ -460,7 +455,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
}
public void shutdownNow() {
client.shutdown();
IOUtils.closeQuietly(client);
if (shutdownExecutor) {
scheduler.shutdownNow(); // Cancel currently executing tasks
try {

View File

@ -753,12 +753,6 @@ public class HttpSolrClient extends SolrClient {
*/
@Override
public void close() throws IOException {
shutdown();
}
@Override
@Deprecated
public void shutdown() {
if (httpClient != null && internalClient) {
HttpClientUtil.close(httpClient);
}

View File

@ -470,12 +470,6 @@ public class LBHttpSolrClient extends SolrClient {
@Override
public void close() {
shutdown();
}
@Override
@Deprecated
public void shutdown() {
if (aliveCheckExecutor != null) {
aliveCheckExecutor.shutdownNow();
}