org.apache.solr.client.solrj.request

## Class CollectionAdminRequest.AsyncCollectionAdminRequest

- java.lang.Object
- - org.apache.solr.client.solrj.SolrRequest<T>
  - - org.apache.solr.client.solrj.request.CollectionAdminRequest<CollectionAdminResponse>
    - - org.apache.solr.client.solrj.request.CollectionAdminRequest.AsyncCollectionAdminRequest

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    CollectionAdminRequest.AddReplica, CollectionAdminRequest.AsyncCollectionSpecificAdminRequest, CollectionAdminRequest.AsyncShardSpecificAdminRequest, CollectionAdminRequest.BalanceShardUnique, CollectionAdminRequest.CollectionAdminRoleRequest, CollectionAdminRequest.CreateAlias, CollectionAdminRequest.DeleteAlias, CollectionAdminRequest.DeleteNode, CollectionAdminRequest.Migrate, CollectionAdminRequest.MigrateClusterState, CollectionAdminRequest.OverseerStatus, CollectionAdminRequest.RebalanceLeaders, CollectionAdminRequest.ReplaceNode, CollectionAdminRequest.SplitShard
  Enclosing class:
    CollectionAdminRequest<T extends CollectionAdminResponse>

      public abstract static class CollectionAdminRequest.AsyncCollectionAdminRequest
      extends CollectionAdminRequest<CollectionAdminResponse>

  Base class for asynchronous collection admin requests
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.solr.client.solrj.request.CollectionAdminRequest

      `CollectionAdminRequest.AddReplica, CollectionAdminRequest.AddReplicaProp, CollectionAdminRequest.AddRole, CollectionAdminRequest.AsyncCollectionAdminRequest, CollectionAdminRequest.AsyncCollectionSpecificAdminRequest, CollectionAdminRequest.AsyncShardSpecificAdminRequest, CollectionAdminRequest.Backup, CollectionAdminRequest.BalanceShardUnique, CollectionAdminRequest.ClusterProp, CollectionAdminRequest.ClusterStatus, CollectionAdminRequest.CollectionAdminRoleRequest, CollectionAdminRequest.Create, CollectionAdminRequest.CreateAlias, CollectionAdminRequest.CreateShard, CollectionAdminRequest.CreateSnapshot, CollectionAdminRequest.Delete, CollectionAdminRequest.DeleteAlias, CollectionAdminRequest.DeleteNode, CollectionAdminRequest.DeleteReplica, CollectionAdminRequest.DeleteReplicaProp, CollectionAdminRequest.DeleteShard, CollectionAdminRequest.DeleteSnapshot, CollectionAdminRequest.DeleteStatus, CollectionAdminRequest.ForceLeader, CollectionAdminRequest.List, CollectionAdminRequest.ListSnapshots, CollectionAdminRequest.Migrate, CollectionAdminRequest.MigrateClusterState, CollectionAdminRequest.OverseerStatus, CollectionAdminRequest.RebalanceLeaders, CollectionAdminRequest.Reload, CollectionAdminRequest.RemoveRole, CollectionAdminRequest.ReplaceNode, CollectionAdminRequest.RequestStatus, CollectionAdminRequest.RequestStatusResponse, CollectionAdminRequest.Restore, CollectionAdminRequest.ShardSpecificAdminRequest, CollectionAdminRequest.SplitShard`

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

      `SolrRequest.METHOD`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `asyncId`

    - ### Fields inherited from class org.apache.solr.client.solrj.request.CollectionAdminRequest

      `action`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AsyncCollectionAdminRequest(CollectionParams.CollectionAction action)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected CollectionAdminResponse` | `createResponse(SolrClient client)` Create a new SolrResponse to hold the response from the server
    `String` | `getAsyncId()`
    `SolrParams` | `getParams()`
    `RequestStatusState` | `processAndWait(SolrClient client, long timeoutSeconds)` Send this request to a Solr server, and wait (up to a timeout) for the request to complete or fail
    `RequestStatusState` | `processAndWait(String asyncId, SolrClient client, long timeoutSeconds)` Send this request to a Solr server, and wait (up to a timeout) for the request to complete or fail
    `String` | `processAsync(SolrClient client)` Process this request asynchronously, generating and returning a request id
    `String` | `processAsync(String asyncId, SolrClient client)` Process this request asynchronously, using a specified request id
    `CollectionAdminRequest.AsyncCollectionAdminRequest` | `setAsyncId(String id)` Deprecated. Use `processAsync(String, SolrClient)` or `processAsync(SolrClient)`

    - ### Methods inherited from class org.apache.solr.client.solrj.request.CollectionAdminRequest

      `addProperties, addReplicaByRouteKey, addReplicaProperty, addReplicaToShard, addRole, backupCollection, balanceReplicaProperty, createAlias, createCollection, createCollection, createCollectionWithImplicitRouter, createShard, deleteAlias, deleteAllAsyncIds, deleteAsyncId, deleteCollection, deleteReplica, deleteReplicaProperty, deleteReplicasFromAllShards, deleteReplicasFromShard, deleteShard, forceLeaderElection, getClusterStatus, getContentStreams, getOverseerStatus, listCollections, migrateCollectionFormat, migrateData, rebalanceLeaders, reloadCollection, removeRole, requestStatus, restoreCollection, setClusterProperty, splitShard, waitForAsyncRequest`

    - ### 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

    - #### asyncId

          protected String asyncId

  - ### Constructor Detail

    - #### AsyncCollectionAdminRequest

          public AsyncCollectionAdminRequest(CollectionParams.CollectionAction action)

  - ### Method Detail

    - #### createResponse

          protected CollectionAdminResponse 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<CollectionAdminResponse>`
      Parameters:
        `client` - the `SolrClient` the request will be sent to

    - #### getAsyncId

          public String getAsyncId()

    - #### setAsyncId

          @Deprecated
          public CollectionAdminRequest.AsyncCollectionAdminRequest setAsyncId(String id)

      Deprecated. Use `processAsync(String, SolrClient)` or `processAsync(SolrClient)`

    - #### processAsync

          public String processAsync(SolrClient client)
                              throws IOException,
                                     SolrServerException

      Process this request asynchronously, generating and returning a request id
      Parameters:
        `client` - a Solr client
      Returns:
        the request id
      Throws:
        `IOException`
        `SolrServerException`
      See Also:
        `CollectionAdminRequest.RequestStatus`

    - #### processAsync

          public String processAsync(String asyncId,
                                     SolrClient client)
                              throws IOException,
                                     SolrServerException

      Process this request asynchronously, using a specified request id
      Parameters:
        `asyncId` - the request id
        `client` - a Solr client
      Returns:
        the request id
      Throws:
        `IOException`
        `SolrServerException`

    - #### processAndWait

          public RequestStatusState processAndWait(SolrClient client,
                                                   long timeoutSeconds)
                                            throws SolrServerException,
                                                   InterruptedException,
                                                   IOException

      Send this request to a Solr server, and wait (up to a timeout) for the request to complete or fail
      Parameters:
        `client` - a Solr client
        `timeoutSeconds` - the maximum time to wait
      Returns:
        the status of the request on completion or timeout
      Throws:
        `SolrServerException`
        `InterruptedException`
        `IOException`

    - #### processAndWait

          public RequestStatusState processAndWait(String asyncId,
                                                   SolrClient client,
                                                   long timeoutSeconds)
                                            throws IOException,
                                                   SolrServerException,
                                                   InterruptedException

      Send this request to a Solr server, and wait (up to a timeout) for the request to complete or fail
      Parameters:
        `asyncId` - an id for the request
        `client` - a Solr client
        `timeoutSeconds` - the maximum time to wait
      Returns:
        the status of the request on completion or timeout
      Throws:
        `IOException`
        `SolrServerException`
        `InterruptedException`

    - #### getParams

          public SolrParams getParams()

      Overrides:
        `getParams` in class `CollectionAdminRequest<CollectionAdminResponse>`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.