org.apache.solr.client.solrj.request

## Class CoreAdminRequest

- java.lang.Object
- - org.apache.solr.client.solrj.SolrRequest<CoreAdminResponse>
  - - org.apache.solr.client.solrj.request.CoreAdminRequest

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  CoreAdminRequest.Create, CoreAdminRequest.MergeIndexes, CoreAdminRequest.OverrideLastPublished, CoreAdminRequest.Persist, CoreAdminRequest.RequestRecovery, CoreAdminRequest.RequestSyncShard, CoreAdminRequest.Unload, CoreAdminRequest.WaitForState

    public class CoreAdminRequest
    extends SolrRequest<CoreAdminResponse>

This class is experimental and subject to change.

Since:
  solr 1.3
See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `CoreAdminRequest.Create`
`static class` `CoreAdminRequest.MergeIndexes`
`static class` `CoreAdminRequest.OverrideLastPublished`
`static class` `CoreAdminRequest.Persist`
`static class` `CoreAdminRequest.RequestRecovery`
`static class` `CoreAdminRequest.RequestSyncShard`
`static class` `CoreAdminRequest.Unload`
`static class` `CoreAdminRequest.WaitForState`

### Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest

`SolrRequest.METHOD`

### Field Summary

Fields
`protected CoreAdminParams.CoreAdminAction` `action`
`protected String` `core`
`protected boolean` `isIndexInfoNeeded`
`protected String` `other`

### Constructor Summary

Constructors
Constructor and Description
`CoreAdminRequest()`
`CoreAdminRequest(String path)`

### Method Summary

Methods
`static CoreAdminResponse` `createCore(String name, String instanceDir, SolrClient client)`
`static CoreAdminResponse` `createCore(String name, String instanceDir, SolrClient client, String configFile, String schemaFile)`
`static CoreAdminResponse` `createCore(String name, String instanceDir, SolrClient client, String configFile, String schemaFile, String dataDir, String tlogDir)`
`protected CoreAdminResponse` `createResponse(SolrClient client)` Create a new SolrResponse to hold the response from the server
`Collection<ContentStream>` `getContentStreams()`
`SolrParams` `getParams()`
`static CoreAdminResponse` `getStatus(String name, SolrClient client)`
`static CoreAdminResponse` `mergeIndexes(String name, String[] indexDirs, String[] srcCores, SolrClient client)`
`static CoreAdminResponse` `reloadCore(String name, SolrClient client)`
`static CoreAdminResponse` `renameCore(String coreName, String newName, SolrClient client)`
`void` `setAction(CoreAdminParams.CoreAdminAction action)`
`void` `setCoreName(String coreName)`
`void` `setIndexInfoNeeded(boolean isIndexInfoNeeded)`
`void` `setOtherCoreName(String otherCoreName)`
`static CoreAdminResponse` `unloadCore(String name, boolean deleteIndex, boolean deleteInstanceDir, SolrClient client)`
`static CoreAdminResponse` `unloadCore(String name, boolean deleteIndex, SolrClient client)`
`static CoreAdminResponse` `unloadCore(String name, SolrClient client)`

### Methods inherited from class org.apache.solr.client.solrj.SolrRequest

`getBasicAuthPassword, getBasicAuthUser, getMethod, getPath, getQueryParams, getResponseParser, getStreamingResponseCallback, process, process, setBasicAuthCredentials, setMethod, setPath, setQueryParams, setResponseParser, setStreamingResponseCallback`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### core

    protected String core

#### other

    protected String other

#### isIndexInfoNeeded

    protected boolean isIndexInfoNeeded

#### action

    protected CoreAdminParams.CoreAdminAction action

### Constructor Detail

#### CoreAdminRequest

    public CoreAdminRequest()

#### CoreAdminRequest

    public CoreAdminRequest(String path)

### Method Detail

#### setCoreName

    public final void setCoreName(String coreName)

#### setOtherCoreName

    public final void setOtherCoreName(String otherCoreName)

#### setIndexInfoNeeded

    public final void setIndexInfoNeeded(boolean isIndexInfoNeeded)

#### setAction

    public void setAction(CoreAdminParams.CoreAdminAction action)

#### getParams

    public SolrParams getParams()

Specified by:
  `getParams` in class `SolrRequest<CoreAdminResponse>`

#### getContentStreams

    public Collection<ContentStream> getContentStreams()
                                                throws IOException

Specified by:
  `getContentStreams` in class `SolrRequest<CoreAdminResponse>`
Throws:
  `IOException`

#### createResponse

    protected CoreAdminResponse createResponse(SolrClient client)

Description copied from class: `SolrRequest`
Create a new SolrResponse to hold the response from the server

Specified by:
  `createResponse` in class `SolrRequest<CoreAdminResponse>`
Parameters:
  `client` - the `SolrClient` the request will be sent to

#### reloadCore

    public static CoreAdminResponse reloadCore(String name,
                               SolrClient client)
                                        throws SolrServerException,
                                               IOException

Throws:
  `SolrServerException`
  `IOException`

#### unloadCore

    public static CoreAdminResponse unloadCore(String name,
                               SolrClient client)
                                        throws SolrServerException,
                                               IOException

Throws:
  `SolrServerException`
  `IOException`

#### unloadCore

    public static CoreAdminResponse unloadCore(String name,
                               boolean deleteIndex,
                               SolrClient client)
                                        throws SolrServerException,
                                               IOException

Throws:
  `SolrServerException`
  `IOException`

#### unloadCore

    public static CoreAdminResponse unloadCore(String name,
                               boolean deleteIndex,
                               boolean deleteInstanceDir,
                               SolrClient client)
                                        throws SolrServerException,
                                               IOException

Throws:
  `SolrServerException`
  `IOException`

#### renameCore

    public static CoreAdminResponse renameCore(String coreName,
                               String newName,
                               SolrClient client)
                                        throws SolrServerException,
                                               IOException

Throws:
  `SolrServerException`
  `IOException`

#### getStatus

    public static CoreAdminResponse getStatus(String name,
                              SolrClient client)
                                       throws SolrServerException,
                                              IOException

Throws:
  `SolrServerException`
  `IOException`

#### createCore

    public static CoreAdminResponse createCore(String name,
                               String instanceDir,
                               SolrClient client)
                                        throws SolrServerException,
                                               IOException

Throws:
  `SolrServerException`
  `IOException`

#### createCore

    public static CoreAdminResponse createCore(String name,
                               String instanceDir,
                               SolrClient client,
                               String configFile,
                               String schemaFile)
                                        throws SolrServerException,
                                               IOException

Throws:
  `SolrServerException`
  `IOException`

#### createCore

    public static CoreAdminResponse createCore(String name,
                               String instanceDir,
                               SolrClient client,
                               String configFile,
                               String schemaFile,
                               String dataDir,
                               String tlogDir)
                                        throws SolrServerException,
                                               IOException

Throws:
  `SolrServerException`
  `IOException`

#### mergeIndexes

    public static CoreAdminResponse mergeIndexes(String name,
                                 String[] indexDirs,
                                 String[] srcCores,
                                 SolrClient client)
                                          throws SolrServerException,
                                                 IOException

Throws:
  `SolrServerException`
  `IOException`