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. * The deprecated <nrtMode> configuration in solrconfig.xml has been removed.
Please remove it from solrconfig.xml. Please remove it from solrconfig.xml.
* SolrClient.shutdown() has been removed, use SolrClient.close() instead.
Detailed Change List Detailed Change List
---------------------- ----------------------
@ -58,6 +60,8 @@ Other Changes
tests to allow for multiple tests without the same class. tests to allow for multiple tests without the same class.
(Ramkumar Aiyengar, Erick Erickson, Mike McCandless) (Ramkumar Aiyengar, Erick Erickson, Mike McCandless)
* SOLR-6954: Deprecated SolrClient.shutdown() method removed (Alan Woodward)
================== 5.1.0 ================== ================== 5.1.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release 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 * Shutdown all cores within the EmbeddedSolrServer instance
*/ */
@Override
@Deprecated
public void shutdown() {
coreContainer.shutdown();
}
@Override @Override
public void close() throws IOException { public void close() throws IOException {
shutdown(); coreContainer.shutdown();
} }
/** /**

View File

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

View File

@ -400,17 +400,4 @@ public abstract class SolrClient implements Serializable, Closeable {
return binder; 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 @Override
public void close() throws IOException { public void close() throws IOException {
shutdown();
}
@Override
@Deprecated
public void shutdown() {
if (zkStateReader != null) { if (zkStateReader != null) {
synchronized(this) { synchronized(this) {
if (zkStateReader!= null) if (zkStateReader!= null)
@ -1048,7 +1042,7 @@ public class CloudSolrClient extends SolrClient {
} }
if (shutdownLBHttpSolrServer) { if (shutdownLBHttpSolrServer) {
lbClient.shutdown(); lbClient.close();
} }
if (clientIsInternal && myClient!=null) { 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.ModifiableSolrParams;
import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.params.UpdateParams; 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.NamedList;
import org.apache.solr.common.util.SolrjNamedThreadFactory; import org.apache.solr.common.util.SolrjNamedThreadFactory;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -425,13 +426,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
@Override @Override
public void close() { public void close() {
shutdown(); IOUtils.closeQuietly(client);
}
@Override
@Deprecated
public void shutdown() {
client.shutdown();
if (shutdownExecutor) { if (shutdownExecutor) {
scheduler.shutdown(); scheduler.shutdown();
try { try {
@ -460,7 +455,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
} }
public void shutdownNow() { public void shutdownNow() {
client.shutdown(); IOUtils.closeQuietly(client);
if (shutdownExecutor) { if (shutdownExecutor) {
scheduler.shutdownNow(); // Cancel currently executing tasks scheduler.shutdownNow(); // Cancel currently executing tasks
try { try {

View File

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

View File

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