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

Method swap

solr/core/src/java/org/apache/solr/core/CoreContainer.java:2042–2052  ·  view source on GitHub ↗

Swaps two SolrCore descriptors.

(String n0, String n1)

Source from the content-addressed store, hash-verified

2040 }
2041 }
2042
2043 /** Swaps two SolrCore descriptors. */
2044 public void swap(String n0, String n1) {
2045 apiAssumeStandalone();
2046 if (n0 == null || n1 == null) {
2047 throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Can not swap unnamed cores.");
2048 }
2049 solrCores.swap(n0, n1);
2050
2051 coresLocator.swap(this, solrCores.getCoreDescriptor(n0), solrCores.getCoreDescriptor(n1));
2052
2053 log.info("swapped: {} with {}", n0, n1);
2054 }
2055

Callers

nothing calls this directly

Calls 4

apiAssumeStandaloneMethod · 0.95
swapMethod · 0.65
getCoreDescriptorMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected