org.apache.solr.client.solrj.request

## Class CollectionAdminRequest

- java.lang.Object
- - org.apache.solr.client.solrj.SolrRequest
  - - org.apache.solr.client.solrj.request.CollectionAdminRequest

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  CollectionAdminRequest.CollectionShardAdminRequest, CollectionAdminRequest.Create, CollectionAdminRequest.CreateAlias, CollectionAdminRequest.Delete, CollectionAdminRequest.DeleteAlias, CollectionAdminRequest.Reload, CollectionAdminRequest.RequestStatus

    public class CollectionAdminRequest
    extends SolrRequest

This class is experimental and subject to change.

Since:
  solr 4.5
See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `CollectionAdminRequest.AddReplica`
`protected static class` `CollectionAdminRequest.CollectionShardAdminRequest`
`static class` `CollectionAdminRequest.Create`
`static class` `CollectionAdminRequest.CreateAlias`
`static class` `CollectionAdminRequest.CreateShard`
`static class` `CollectionAdminRequest.Delete`
`static class` `CollectionAdminRequest.DeleteAlias`
`static class` `CollectionAdminRequest.DeleteShard`
`static class` `CollectionAdminRequest.Reload`
`static class` `CollectionAdminRequest.RequestStatus`
`static class` `CollectionAdminRequest.SplitShard`

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

`SolrRequest.METHOD`

### Field Summary

Fields
`protected CollectionParams.CollectionAction` `action`
`protected String` `asyncId`
`protected String` `collection`

### Constructor Summary

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

### Method Summary

Methods
`static CollectionAdminResponse` `createAlias(String name, String collections, SolrServer server)`
`static CollectionAdminResponse` `createCollection(String name, Integer shards, Integer repl, Integer maxShards, String nodeSet, String conf, String routerField, SolrServer server)`
`static CollectionAdminResponse` `createCollection(String name, Integer shards, Integer repl, Integer maxShards, String nodeSet, String conf, String routerField, SolrServer server, String asyncId)`
`static CollectionAdminResponse` `createCollection(String name, Integer shards, String conf, SolrServer server)`
`static CollectionAdminResponse` `createCollection(String name, Integer shards, String conf, SolrServer server, String asyncId)`
`static CollectionAdminResponse` `createCollection(String name, String shards, Integer repl, Integer maxShards, String nodeSet, String conf, String routerField, SolrServer server)`
`static CollectionAdminResponse` `createCollection(String name, String shards, Integer repl, Integer maxShards, String nodeSet, String conf, String routerField, SolrServer server, String asyncId)`
`static CollectionAdminResponse` `createCollection(String name, String shards, String conf, SolrServer server)`
`static CollectionAdminResponse` `createCollection(String name, String shards, String conf, SolrServer server, String asyncId)`
`static CollectionAdminResponse` `createShard(String name, String shard, SolrServer server)`
`static CollectionAdminResponse` `createShard(String name, String shard, String nodeSet, SolrServer server)`
`static CollectionAdminResponse` `deleteAlias(String name, SolrServer server)`
`static CollectionAdminResponse` `deleteCollection(String name, SolrServer server)`
`static CollectionAdminResponse` `deleteCollection(String name, SolrServer server, String asyncId)`
`static CollectionAdminResponse` `deleteShard(String name, String shard, SolrServer server)`
`Collection<ContentStream>` `getContentStreams()`
`SolrParams` `getParams()`
`CollectionAdminResponse` `process(SolrServer server)`
`static CollectionAdminResponse` `reloadCollection(String name, SolrServer server)`
`static CollectionAdminResponse` `reloadCollection(String name, SolrServer server, String asyncId)`
`static CollectionAdminResponse` `requestStatus(String requestId, SolrServer server)`
`void` `setAction(CollectionParams.CollectionAction action)`
`void` `setAsyncId(String asyncId)`
`void` `setCollectionName(String collectionName)`
`static CollectionAdminResponse` `splitShard(String name, String shard, SolrServer server)`
`static CollectionAdminResponse` `splitShard(String name, String shard, SolrServer server, String asyncId)`
`static CollectionAdminResponse` `splitShard(String name, String shard, String ranges, SolrServer server)`
`static CollectionAdminResponse` `splitShard(String name, String shard, String ranges, SolrServer server, String asyncId)`

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

`getMethod, getPath, getResponseParser, getStreamingResponseCallback, setMethod, setPath, setResponseParser, setStreamingResponseCallback`

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

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

### Field Detail

#### collection

    protected String collection

#### action

    protected CollectionParams.CollectionAction action

#### asyncId

    protected String asyncId

### Constructor Detail

#### CollectionAdminRequest

    public CollectionAdminRequest()

#### CollectionAdminRequest

    public CollectionAdminRequest(String path)

### Method Detail

#### setCollectionName

    public final void setCollectionName(String collectionName)

#### setAction

    public void setAction(CollectionParams.CollectionAction action)

#### setAsyncId

    public void setAsyncId(String asyncId)

#### getParams

    public SolrParams getParams()

Specified by:
  `getParams` in class `SolrRequest`

#### getContentStreams

    public Collection<ContentStream> getContentStreams()
                                                throws IOException

Specified by:
  `getContentStreams` in class `SolrRequest`
Throws:
  `IOException`

#### process

    public CollectionAdminResponse process(SolrServer server)
                                    throws SolrServerException,
                                           IOException

Specified by:
  `process` in class `SolrRequest`
Throws:
  `SolrServerException`
  `IOException`

#### createCollection

    public static CollectionAdminResponse createCollection(String name,
                                           Integer shards,
                                           Integer repl,
                                           Integer maxShards,
                                           String nodeSet,
                                           String conf,
                                           String routerField,
                                           SolrServer server)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### createCollection

    public static CollectionAdminResponse createCollection(String name,
                                           Integer shards,
                                           Integer repl,
                                           Integer maxShards,
                                           String nodeSet,
                                           String conf,
                                           String routerField,
                                           SolrServer server,
                                           String asyncId)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### createCollection

    public static CollectionAdminResponse createCollection(String name,
                                           Integer shards,
                                           String conf,
                                           SolrServer server)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### createCollection

    public static CollectionAdminResponse createCollection(String name,
                                           Integer shards,
                                           String conf,
                                           SolrServer server,
                                           String asyncId)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### createCollection

    public static CollectionAdminResponse createCollection(String name,
                                           String shards,
                                           Integer repl,
                                           Integer maxShards,
                                           String nodeSet,
                                           String conf,
                                           String routerField,
                                           SolrServer server)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### createCollection

    public static CollectionAdminResponse createCollection(String name,
                                           String shards,
                                           Integer repl,
                                           Integer maxShards,
                                           String nodeSet,
                                           String conf,
                                           String routerField,
                                           SolrServer server,
                                           String asyncId)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### createCollection

    public static CollectionAdminResponse createCollection(String name,
                                           String shards,
                                           String conf,
                                           SolrServer server)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### createCollection

    public static CollectionAdminResponse createCollection(String name,
                                           String shards,
                                           String conf,
                                           SolrServer server,
                                           String asyncId)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### reloadCollection

    public static CollectionAdminResponse reloadCollection(String name,
                                           SolrServer server)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### reloadCollection

    public static CollectionAdminResponse reloadCollection(String name,
                                           SolrServer server,
                                           String asyncId)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### deleteCollection

    public static CollectionAdminResponse deleteCollection(String name,
                                           SolrServer server)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### deleteCollection

    public static CollectionAdminResponse deleteCollection(String name,
                                           SolrServer server,
                                           String asyncId)
                                                    throws SolrServerException,
                                                           IOException

Throws:
  `SolrServerException`
  `IOException`

#### requestStatus

    public static CollectionAdminResponse requestStatus(String requestId,
                                        SolrServer server)
                                                 throws SolrServerException,
                                                        IOException

Throws:
  `SolrServerException`
  `IOException`

#### createShard

    public static CollectionAdminResponse createShard(String name,
                                      String shard,
                                      String nodeSet,
                                      SolrServer server)
                                               throws SolrServerException,
                                                      IOException

Throws:
  `SolrServerException`
  `IOException`

#### createShard

    public static CollectionAdminResponse createShard(String name,
                                      String shard,
                                      SolrServer server)
                                               throws SolrServerException,
                                                      IOException

Throws:
  `SolrServerException`
  `IOException`

#### splitShard

    public static CollectionAdminResponse splitShard(String name,
                                     String shard,
                                     String ranges,
                                     SolrServer server)
                                              throws SolrServerException,
                                                     IOException

Throws:
  `SolrServerException`
  `IOException`

#### splitShard

    public static CollectionAdminResponse splitShard(String name,
                                     String shard,
                                     String ranges,
                                     SolrServer server,
                                     String asyncId)
                                              throws SolrServerException,
                                                     IOException

Throws:
  `SolrServerException`
  `IOException`

#### splitShard

    public static CollectionAdminResponse splitShard(String name,
                                     String shard,
                                     SolrServer server)
                                              throws SolrServerException,
                                                     IOException

Throws:
  `SolrServerException`
  `IOException`

#### splitShard

    public static CollectionAdminResponse splitShard(String name,
                                     String shard,
                                     SolrServer server,
                                     String asyncId)
                                              throws SolrServerException,
                                                     IOException

Throws:
  `SolrServerException`
  `IOException`

#### deleteShard

    public static CollectionAdminResponse deleteShard(String name,
                                      String shard,
                                      SolrServer server)
                                               throws SolrServerException,
                                                      IOException

Throws:
  `SolrServerException`
  `IOException`

#### createAlias

    public static CollectionAdminResponse createAlias(String name,
                                      String collections,
                                      SolrServer server)
                                               throws SolrServerException,
                                                      IOException

Throws:
  `SolrServerException`
  `IOException`

#### deleteAlias

    public static CollectionAdminResponse deleteAlias(String name,
                                      SolrServer server)
                                               throws SolrServerException,
                                                      IOException

Throws:
  `SolrServerException`
  `IOException`