Add convenience overloaded register method

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@701352 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2008-10-03 11:40:22 +00:00
parent 8566f15204
commit a9380dde07

View File

@ -266,7 +266,10 @@ public class CoreContainer
}
/**
* Registers a SolrCore descriptor in the registry.
* Registers a SolrCore descriptor in the registry using the specified name.
*
* If returnPrev==false, the old core, if different, is closed.
*
* @return a previous core having the same name if it existed and returnPrev==true
*/
public SolrCore register(String name, SolrCore core, boolean returnPrev) {
@ -300,6 +303,15 @@ public class CoreContainer
}
/**
* Registers a SolrCore descriptor in the registry using the core's name.
* If returnPrev==false, the old core, if different, is closed.
* @return a previous core having the same name if it existed and returnPrev==true
*/
public SolrCore register(SolrCore core, boolean returnPrev) {
return register(core.getName(), core, returnPrev);
}
/**
* Creates a new core based on a descriptor but does not register it.
*