MCPcopy Create free account
hub / github.com/apache/solr / close

Method close

solr/core/src/java/org/apache/solr/core/SolrCore.java:1758–1774  ·  view source on GitHub ↗

Close all resources allocated by the core if it is no longer in use... searcher updateHandler all CloseHooks will be notified All MBeans will be unregistered from MBeanServer if JMX was enabled The behavior of this method is determined by the result of decreme

()

Source from the content-addressed store, hash-verified

1756 * <ul>
1757 * <li>If reference count is &gt; 0, the usage count is decreased by 1 and no resources are
1758 * released.
1759 * <li>If reference count is == 0, the resources are released.
1760 * <li>If reference count is &lt; 0, and error is logged and no further action is taken.
1761 * </ul>
1762 *
1763 * @see #isClosed()
1764 */
1765 @Override
1766 public void close() {
1767 try {
1768 int count = refCount.decrementAndGet();
1769 if (count < 0) {
1770 log.error(
1771 "Too many close [count:{}] on {}. Please report this exception to users@solr.apache.org",
1772 count,
1773 this);
1774 assert false : "Too many closes on SolrCore";
1775 } else if (count == 0) {
1776 doClose();
1777 }

Callers 15

getCoreMethod · 0.95
assertUlogPresenceMethod · 0.95
testCloseMethod · 0.95
testRefCountMethod · 0.95
callMethod · 0.95
testLazyLoadMethod · 0.95
testLazySearchMethod · 0.95
testRaceMethod · 0.95
testCreateSameMethod · 0.95
testEstimatorMethod · 0.95

Calls 6

doCloseMethod · 0.95
clearMethod · 0.95
getMethod · 0.65
removeMethod · 0.65
closeMethod · 0.65
errorMethod · 0.45

Tested by 12

getCoreMethod · 0.76
assertUlogPresenceMethod · 0.76
testCloseMethod · 0.76
testRefCountMethod · 0.76
callMethod · 0.76
testLazyLoadMethod · 0.76
testLazySearchMethod · 0.76
testRaceMethod · 0.76
testCreateSameMethod · 0.76
testEstimatorMethod · 0.76