Class HttpReplicator
An HTTP implementation of IReplicator. Assumes the API supported by ReplicationService.
Inherited Members
Namespace: Lucene.Net.Replicator.Http
Assembly: Lucene.Net.Replicator.dll
Syntax
public class HttpReplicator : HttpClientBase, IReplicator, IDisposable
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Constructors
HttpReplicator(string, int, string, HttpMessageHandler)
Creates a new HttpReplicator with the given host, port and path. HttpClientBase(string, int, string, HttpMessageHandler) for more details.
Declaration
public HttpReplicator(string host, int port, string path, HttpMessageHandler messageHandler = null)
Parameters
Type | Name | Description |
---|---|---|
string | host | |
int | port | |
string | path | |
HttpMessageHandler | messageHandler |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
HttpReplicator(string, HttpClient)
Creates a new HttpReplicator with the given url
and HttpClient.
HttpClientBase(string, HttpClient) for more details.
Declaration
public HttpReplicator(string url, HttpClient client)
Parameters
Type | Name | Description |
---|---|---|
string | url | |
HttpClient | client |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
HttpReplicator(string, HttpMessageHandler)
Creates a new HttpReplicator with the given url. HttpClientBase(string, HttpMessageHandler) for more details.
Declaration
public HttpReplicator(string url, HttpMessageHandler messageHandler = null)
Parameters
Type | Name | Description |
---|---|---|
string | url | |
HttpMessageHandler | messageHandler |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Methods
CheckForUpdate(string)
Checks for updates at the remote host.
Declaration
public virtual SessionToken CheckForUpdate(string currentVersion)
Parameters
Type | Name | Description |
---|---|---|
string | currentVersion |
Returns
Type | Description |
---|---|
SessionToken |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
ObtainFile(string, string, string)
Obtains the given file from it's source at the remote host.
Declaration
public virtual Stream ObtainFile(string sessionId, string source, string fileName)
Parameters
Type | Name | Description |
---|---|---|
string | sessionId | |
string | source | |
string | fileName |
Returns
Type | Description |
---|---|
Stream |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Publish(IRevision)
Not supported.
Declaration
public virtual void Publish(IRevision revision)
Parameters
Type | Name | Description |
---|---|---|
IRevision | revision |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Exceptions
Type | Condition |
---|---|
NotSupportedException | this replicator implementation does not support remote publishing of revisions |
Release(string)
Releases a session obtained from the remote host.
Declaration
public virtual void Release(string sessionId)
Parameters
Type | Name | Description |
---|---|---|
string | sessionId |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.