Class ReplicationService
A server-side service for handling replication requests. The service assumes
requests are sent in the format /<context>/<shard>/<action>
where
context
is the servlet context, e.g. REPLICATION_CONTEXTshard
is the ID of the shard, e.g. "s1"action
is one of ReplicationService.ReplicationAction values
http://host:port/replicate/s1/update
.
Implements
Inherited Members
Namespace: Lucene.Net.Replicator.Http
Assembly: Lucene.Net.Replicator.dll
Syntax
public class ReplicationService : IReplicationService
Remarks
This service is written using abstractions over requests and responses which makes it easy to integrate into any hosting framework.
See the Lucene.Net.Replicator.AspNetCore for an example of an implementation for the AspNetCore Framework.Note
This API is experimental and might change in incompatible ways in the next release.
Constructors
ReplicationService(IReadOnlyDictionary<string, IReplicator>, string)
A server-side service for handling replication requests. The service assumes
requests are sent in the format /<context>/<shard>/<action>
where
context
is the servlet context, e.g. REPLICATION_CONTEXTshard
is the ID of the shard, e.g. "s1"action
is one of ReplicationService.ReplicationAction values
http://host:port/replicate/s1/update
.
Declaration
public ReplicationService(IReadOnlyDictionary<string, IReplicator> replicators, string context = "/replicate")
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyDictionary<string, IReplicator> | replicators | |
string | context |
Remarks
This service is written using abstractions over requests and responses which makes it easy to integrate into any hosting framework.
See the Lucene.Net.Replicator.AspNetCore for an example of an implementation for the AspNetCore Framework.Note
This API is experimental and might change in incompatible ways in the next release.
Fields
REPLICATE_FILENAME_PARAM
Request parameter name for providing the file's name.
Declaration
public const string REPLICATE_FILENAME_PARAM = "filename"
Field Value
Type | Description |
---|---|
string |
Remarks
This service is written using abstractions over requests and responses which makes it easy to integrate into any hosting framework.
See the Lucene.Net.Replicator.AspNetCore for an example of an implementation for the AspNetCore Framework.Note
This API is experimental and might change in incompatible ways in the next release.
REPLICATE_SESSION_ID_PARAM
Request parameter name for providing a session ID.
Declaration
public const string REPLICATE_SESSION_ID_PARAM = "sessionid"
Field Value
Type | Description |
---|---|
string |
Remarks
This service is written using abstractions over requests and responses which makes it easy to integrate into any hosting framework.
See the Lucene.Net.Replicator.AspNetCore for an example of an implementation for the AspNetCore Framework.Note
This API is experimental and might change in incompatible ways in the next release.
REPLICATE_SOURCE_PARAM
Request parameter name for providing the file's source.
Declaration
public const string REPLICATE_SOURCE_PARAM = "source"
Field Value
Type | Description |
---|---|
string |
Remarks
This service is written using abstractions over requests and responses which makes it easy to integrate into any hosting framework.
See the Lucene.Net.Replicator.AspNetCore for an example of an implementation for the AspNetCore Framework.Note
This API is experimental and might change in incompatible ways in the next release.
REPLICATE_VERSION_PARAM
Request parameter name for providing the revision version.
Declaration
public const string REPLICATE_VERSION_PARAM = "version"
Field Value
Type | Description |
---|---|
string |
Remarks
This service is written using abstractions over requests and responses which makes it easy to integrate into any hosting framework.
See the Lucene.Net.Replicator.AspNetCore for an example of an implementation for the AspNetCore Framework.Note
This API is experimental and might change in incompatible ways in the next release.
REPLICATION_CONTEXT
The default context path for the ReplicationService.
Declaration
public const string REPLICATION_CONTEXT = "/replicate"
Field Value
Type | Description |
---|---|
string |
Remarks
This service is written using abstractions over requests and responses which makes it easy to integrate into any hosting framework.
See the Lucene.Net.Replicator.AspNetCore for an example of an implementation for the AspNetCore Framework.Note
This API is experimental and might change in incompatible ways in the next release.
Methods
Perform(IReplicationRequest, IReplicationResponse)
Executes the replication task.
Declaration
public virtual void Perform(IReplicationRequest request, IReplicationResponse response)
Parameters
Type | Name | Description |
---|---|---|
IReplicationRequest | request | |
IReplicationResponse | response |
Remarks
This service is written using abstractions over requests and responses which makes it easy to integrate into any hosting framework.
See the Lucene.Net.Replicator.AspNetCore for an example of an implementation for the AspNetCore Framework.Note
This API is experimental and might change in incompatible ways in the next release.
Exceptions
Type | Condition |
---|---|
InvalidOperationException | required parameters are missing |