Show / Hide Table of Contents

    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_CONTEXT
    • shard is the ID of the shard, e.g. "s1"
    • action is one of ReplicationService.ReplicationAction values
    For example, to check whether there are revision updates for shard "s1" you should send the request: http://host:port/replicate/s1/update.

    Inheritance
    System.Object
    ReplicationService
    Implements
    IReplicationService
    Namespace: Lucene.Net.Replicator.Http
    Assembly: Lucene.Net.Replicator.dll
    Syntax
    public class ReplicationService : object, 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.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk

    Constructors

    | Improve this Doc View Source

    ReplicationService(IReadOnlyDictionary<String, IReplicator>, String)

    Declaration
    public ReplicationService(IReadOnlyDictionary<string, IReplicator> replicators, string context = null)
    Parameters
    Type Name Description
    IReadOnlyDictionary<System.String, IReplicator> replicators
    System.String context

    Fields

    | Improve this Doc View Source

    JSON_SERIALIZER_SETTINGS

    Json Serializer Settings to use when serializing and deserializing errors.

    Declaration
    public static readonly JsonSerializerSettings JSON_SERIALIZER_SETTINGS
    Field Value
    Type Description
    JsonSerializerSettings
    | Improve this Doc View Source

    REPLICATE_FILENAME_PARAM

    Request parameter name for providing the file's name.

    Declaration
    public const string REPLICATE_FILENAME_PARAM = null
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    REPLICATE_SESSION_ID_PARAM

    Request parameter name for providing a session ID.

    Declaration
    public const string REPLICATE_SESSION_ID_PARAM = null
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    REPLICATE_SOURCE_PARAM

    Request parameter name for providing the file's source.

    Declaration
    public const string REPLICATE_SOURCE_PARAM = null
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    REPLICATE_VERSION_PARAM

    Request parameter name for providing the revision version.

    Declaration
    public const string REPLICATE_VERSION_PARAM = null
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    REPLICATION_CONTEXT

    The default context path for the ReplicationService.

    Declaration
    public const string REPLICATION_CONTEXT = null
    Field Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    Perform(IReplicationRequest, IReplicationResponse)

    Executes the replication task.

    Declaration
    public virtual void Perform(IReplicationRequest request, IReplicationResponse response)
    Parameters
    Type Name Description
    IReplicationRequest request
    IReplicationResponse response

    Implements

    IReplicationService
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)