lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r893411 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/core/CoreContainer.java src/java/org/apache/solr/core/SolrCore.java
Date Wed, 23 Dec 2009 06:55:27 GMT
Author: noble
Date: Wed Dec 23 06:55:27 2009
New Revision: 893411

URL: http://svn.apache.org/viewvc?rev=893411&view=rev
Log:
SOLR-1661 : Remove adminCore from CoreContainer . removed deprecated methods setAdminCore(),
getAdminCore()

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/src/java/org/apache/solr/core/CoreContainer.java
    lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=893411&r1=893410&r2=893411&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Wed Dec 23 06:55:27 2009
@@ -178,6 +178,8 @@
 * 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
 ----------------------
 

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/CoreContainer.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/CoreContainer.java?rev=893411&r1=893410&r2=893411&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/CoreContainer.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/CoreContainer.java Wed Dec 23 06:55:27
2009
@@ -63,8 +63,6 @@
   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 @@
    * 
    * @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 @@
     }
   }
 
-  /**
-   * 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

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java?rev=893411&r1=893410&r2=893411&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java Wed Dec 23 06:55:27 2009
@@ -670,10 +670,7 @@
    *   <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)...



Mime
View raw message