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
,V2RequestSupport
,MapSerializable
,MapWriter
,NavigableObject
- Direct Known Subclasses:
CollectionAdminRequest.AddReplica
,CollectionAdminRequest.AsyncCollectionSpecificAdminRequest
,CollectionAdminRequest.AsyncShardSpecificAdminRequest
,CollectionAdminRequest.BalanceShardUnique
,CollectionAdminRequest.CollectionAdminRoleRequest
,CollectionAdminRequest.CreateAlias
,CollectionAdminRequest.CreateCategoryRoutedAlias
,CollectionAdminRequest.CreateTimeRoutedAlias
,CollectionAdminRequest.DeleteAlias
,CollectionAdminRequest.DeleteNode
,CollectionAdminRequest.DimensionalRoutedAlias
,CollectionAdminRequest.Migrate
,CollectionAdminRequest.MigrateClusterState
,CollectionAdminRequest.MoveReplica
,CollectionAdminRequest.OverseerStatus
,CollectionAdminRequest.RebalanceLeaders
,CollectionAdminRequest.ReplaceNode
,CollectionAdminRequest.SetAliasProperty
,CollectionAdminRequest.SplitShard
,CollectionAdminRequest.UtilizeNode
- 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.CollectionProp, CollectionAdminRequest.ColStatus, CollectionAdminRequest.Create, CollectionAdminRequest.CreateAlias, CollectionAdminRequest.CreateCategoryRoutedAlias, CollectionAdminRequest.CreateShard, CollectionAdminRequest.CreateSnapshot, CollectionAdminRequest.CreateTimeRoutedAlias, CollectionAdminRequest.Delete, CollectionAdminRequest.DeleteAlias, CollectionAdminRequest.DeleteNode, CollectionAdminRequest.DeleteReplica, CollectionAdminRequest.DeleteReplicaProp, CollectionAdminRequest.DeleteShard, CollectionAdminRequest.DeleteSnapshot, CollectionAdminRequest.DeleteStatus, CollectionAdminRequest.DimensionalRoutedAlias, CollectionAdminRequest.ForceLeader, CollectionAdminRequest.List, CollectionAdminRequest.ListAliases, CollectionAdminRequest.ListSnapshots, CollectionAdminRequest.Migrate, CollectionAdminRequest.MigrateClusterState, CollectionAdminRequest.Modify, CollectionAdminRequest.MoveReplica, CollectionAdminRequest.OverseerStatus, CollectionAdminRequest.RebalanceLeaders, CollectionAdminRequest.ReindexCollection, CollectionAdminRequest.Reload, CollectionAdminRequest.RemoveRole, CollectionAdminRequest.Rename, CollectionAdminRequest.ReplaceNode, CollectionAdminRequest.RequestStatus, CollectionAdminRequest.RequestStatusResponse, CollectionAdminRequest.Restore, CollectionAdminRequest.RoutedAliasAdminRequest, CollectionAdminRequest.SetAliasProperty, CollectionAdminRequest.ShardSpecificAdminRequest, CollectionAdminRequest.SplitShard, CollectionAdminRequest.UtilizeNode
-
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest
SolrRequest.METHOD
-
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
MapWriter.EntryWriter
-
-
Field Summary
Fields Modifier and Type Field Description protected String
asyncId
protected boolean
waitForFinalState
-
Fields inherited from class org.apache.solr.client.solrj.request.CollectionAdminRequest
action, MODIFIABLE_COLLECTION_PROPERTIES, PROPERTY_PREFIX
-
Fields inherited from class org.apache.solr.client.solrj.SolrRequest
SUPPORTED_METHODS, useBinaryV2, usev2
-
-
Constructor Summary
Constructors Constructor Description AsyncCollectionAdminRequest(CollectionParams.CollectionAction action)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CollectionAdminResponse
createResponse(SolrClient client)
Create a new SolrResponse to hold the response from the serverString
getAsyncId()
SolrParams
getParams()
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 failRequestStatusState
processAndWait(SolrClient client, long timeoutSeconds)
Send this request to a Solr server, and wait (up to a timeout) for the request to complete or failString
processAsync(String asyncId, SolrClient client)
Process this request asynchronously, using a specified request idString
processAsync(SolrClient client)
Process this request asynchronously, generating and returning a request idvoid
setAsyncId(String asyncId)
void
setWaitForFinalState(boolean waitForFinalState)
-
Methods inherited from class org.apache.solr.client.solrj.request.CollectionAdminRequest
addProperties, addReplicaByRouteKey, addReplicaProperty, addReplicaToShard, addReplicaToShard, addRole, backupCollection, balanceReplicaProperty, collectionStatus, createAlias, createCategoryRoutedAlias, createCollection, createCollection, createCollection, createCollectionWithImplicitRouter, createCollectionWithImplicitRouter, createDimensionalRoutedAlias, createShard, createTimeRoutedAlias, deleteAlias, deleteAllAsyncIds, deleteAsyncId, deleteCollection, deleteNode, deleteReplica, deleteReplica, deleteReplicaProperty, deleteReplicasFromAllShards, deleteReplicasFromShard, deleteShard, forceLeaderElection, getClusterStatus, getOverseerStatus, getV2Request, listCollections, migrateCollectionFormat, migrateData, modifyCollection, moveReplica, rebalanceLeaders, reindexCollection, reloadCollection, removeRole, renameCollection, requestStatus, restoreCollection, setAliasProperty, setClusterProperty, setCollectionProperty, splitShard, toString, waitForAsyncRequest, writeMap
-
Methods inherited from class org.apache.solr.client.solrj.SolrRequest
addHeader, getBasePath, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getContentWriter, getHeaders, getMethod, getPath, getQueryParams, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, setBasePath, setBasicAuthCredentials, setMethod, setPath, setQueryParams, setResponseParser, setStreamingResponseCallback, setUseBinaryV2, setUserPrincipal, setUseV2
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr
-
-
-
-
Field Detail
-
asyncId
protected String asyncId
-
waitForFinalState
protected boolean waitForFinalState
-
-
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 classSolrRequest<CollectionAdminResponse>
- Parameters:
client
- theSolrClient
the request will be sent to
-
getAsyncId
public String getAsyncId()
-
setWaitForFinalState
public void setWaitForFinalState(boolean waitForFinalState)
-
setAsyncId
public void setAsyncId(String asyncId)
-
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 idclient
- 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 clienttimeoutSeconds
- 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 requestclient
- a Solr clienttimeoutSeconds
- 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 classCollectionAdminRequest<CollectionAdminResponse>
-
-