Package org.apache.solr.client.solrj.request

# Class NodeApi.ReplaceNode

java.lang.Object
org.apache.solr.client.solrj.SolrRequest<SolrJerseyResponse>
org.apache.solr.client.solrj.request.NodeApi.ReplaceNode

All Implemented Interfaces:
  `Serializable`

Enclosing class:
  `NodeApi`

public static class NodeApi.ReplaceNode extends SolrRequest<SolrJerseyResponse>

See Also:
  - Serialized Form

## Nested Class Summary

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

`SolrRequest.ApiVersion, SolrRequest.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType`

## Field Summary

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

`SUPPORTED_METHODS`

## Constructor Summary

Constructors
Constructor
Description
`ReplaceNode(String sourceNodeName)`
Create a ReplaceNode request object.

## Method Summary

Modifier and Type
Method
Description
`protected SolrJerseyResponse`
`createResponse(NamedList<Object> namedList)`
Create a new SolrResponse to hold the response from the server.
`SolrRequest.ApiVersion`
`getApiVersion()`
Indicates which API version this request will make
`RequestWriter.ContentWriter`
`getContentWriter(String _expectedTypeIGNORE)`
If a request object wants to do a push write, implement this method.
`SolrParams`
`getParams()`
The parameters for this request; never null.
`Set<String>`
`getQueryParams()`
Parameter keys that are sent via the query string
`ResponseParser`
`getResponseParser()`
`void`
`setAsync(String async)`
`void`
`setTargetNodeName(String targetNodeName)`
`void`
`setWaitForFinalState(Boolean waitForFinalState)`

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

`addHeader, addHeaders, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getHeaders, getMethod, getPath, getPreferredNodes, getRequestType, getStreamingResponseCallback, getUserPrincipal, process, process, processWithBaseUrl, requiresCollection, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setRequestType, setResponseParser, setStreamingResponseCallback, setUserPrincipal`

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

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

## Constructor Details

### ReplaceNode

public ReplaceNode(String sourceNodeName)
Create a ReplaceNode request object.

Parameters:
  `sourceNodeName` - Path param - The name of the node to be replaced.

## Method Details

### setTargetNodeName

public void setTargetNodeName(String targetNodeName)

Parameters:
  `targetNodeName` - The target node where replicas will be copied. If this parameter is not provided, Solr will identify nodes automatically based on policies or number of cores in each node.

### setWaitForFinalState

public void setWaitForFinalState(Boolean waitForFinalState)

Parameters:
  `waitForFinalState` - If true, the request will complete only when all affected replicas become active. If false, the API will return the status of the single action, which may be before the new replica is online and active.

### setAsync

public void setAsync(String async)

Parameters:
  `async` - Request ID to track this action which will be processed asynchronously.

### getContentWriter

public RequestWriter.ContentWriter getContentWriter(String _expectedTypeIGNORE)
Description copied from class: `SolrRequest`
If a request object wants to do a push write, implement this method.

Overrides:
  `getContentWriter` in class `SolrRequest<SolrJerseyResponse>`
Parameters:
  `_expectedTypeIGNORE` - This is the type that the RequestWriter would like to get. But, it is OK to send any format

### getApiVersion

public SolrRequest.ApiVersion getApiVersion()
Description copied from class: `SolrRequest`
Indicates which API version this request will make

Defaults implementation returns 'V1'.

Overrides:
  `getApiVersion` in class `SolrRequest<SolrJerseyResponse>`

### getParams

public SolrParams getParams()
Description copied from class: `SolrRequest`
The parameters for this request; never null. The runtime type may be mutable but modifications may not affect this `SolrRequest` instance, as it may return a new instance here every time. If the subclass specifies the response type as `ModifiableSolrParams`, then one can expect it to change this request. If the subclass has a setter then one can expect this method to return the value set.

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

### getQueryParams

public Set<String> getQueryParams()
Description copied from class: `SolrRequest`
Parameter keys that are sent via the query string

Overrides:
  `getQueryParams` in class `SolrRequest<SolrJerseyResponse>`

### createResponse

protected SolrJerseyResponse createResponse(NamedList<Object> namedList)
Description copied from class: `SolrRequest`
Create a new SolrResponse to hold the response from the server. If the response extends `SolrResponse`, then there's no need to use the arguments, as `SolrResponse.setResponse(NamedList)` will be called right after this method.

Specified by:
  `createResponse` in class `SolrRequest<SolrJerseyResponse>`
Parameters:
  `namedList` - from `SolrClient.request(SolrRequest, String)`.

### getResponseParser

public ResponseParser getResponseParser()

Overrides:
  `getResponseParser` in class `SolrRequest<SolrJerseyResponse>`
Returns:
  The `ResponseParser`