SOLR-1661 : Remove adminCore from CoreContainer . removed deprecated methods setAdminCore(), getAdminCore()

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@893411 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2009-12-23 06:55:27 +00:00
parent 39fbbd5e94
commit d845266cbe
3 changed files with 4 additions and 44 deletions

View File

@ -178,6 +178,8 @@ Other Changes
* SOLR-1674: Improve analysis tests and cut over to new TokenStream API.
(Robert Muir via Mark Miller)
* SOLR-1661 : Remove adminCore from CoreContainer . removed deprecated methods setAdminCore(), getAdminCore() (noble)
Build
----------------------

View File

@ -63,8 +63,6 @@ public class CoreContainer
protected String libDir = null;
protected ClassLoader libLoader = null;
protected SolrResourceLoader loader = null;
@Deprecated
protected java.lang.ref.WeakReference<SolrCore> adminCore = null;
protected Properties containerProperties;
protected Map<String ,IndexSchema> indexSchemaCache;
protected String adminHandler;
@ -202,7 +200,6 @@ public class CoreContainer
*
* @param dir the home directory of all resources.
* @param cfgis the configuration file InputStream
* @param configName
* @throws ParserConfigurationException
* @throws IOException
* @throws SAXException
@ -550,43 +547,7 @@ public class CoreContainer
}
}
/**
* Sets the preferred core used to handle MultiCore admin tasks.
*/
@Deprecated
public void setAdminCore(SolrCore core) {
synchronized (cores) {
adminCore = new java.lang.ref.WeakReference<SolrCore>(core);
}
}
/**
* Ensures there is a valid core to handle MultiCore admin taks and
* increase its refcount.
* @see SolrCore#close()
* @return the acquired admin core, null if no core is available
*/
@Deprecated
public SolrCore getAdminCore() {
synchronized (cores) {
SolrCore core = adminCore != null ? adminCore.get() : null;
if (core != null && !core.isClosed()) {
core.open();
} else {
for (SolrCore c : cores.values()) {
if (c != null) {
core = c;
core.open();
setAdminCore(core);
break;
}
}
}
return core;
}
}
// ---------------- Multicore self related methods ---------------
// ---------------- Multicore self related methods ---------------
/**
* Creates a CoreAdminHandler for this MultiCore.
* @return a CoreAdminHandler

View File

@ -670,10 +670,7 @@ public final class SolrCore implements SolrInfoMBean {
* <li>All MBeans will be unregistered from MBeanServer if JMX was enabled
* </li>
* </ul>
* <p>
* This method should always be called when the core is obtained through
* {@link CoreContainer#getCore} or {@link CoreContainer#getAdminCore}.
* </p>
* <p>
* <p>
* The behavior of this method is determined by the result of decrementing
* the core's reference count (A core is created with a refrence count of 1)...