Show / Hide Table of Contents

    Class LocalReplicator

    A IReplicator implementation for use by the side that publishes IRevisions, as well for clients to CheckForUpdate(String) check for updates}. When a client needs to be updated, it is returned a SessionToken through which it can ObtainFile(String, String, String) the files of that revision. As long as a revision is being replicated, this replicator guarantees that it will not be Release().

    Replication sessions expire by default after , and the threshold can be configured through ExpirationThreshold.

    Inheritance
    System.Object
    LocalReplicator
    Implements
    IReplicator
    IDisposable
    Namespace: Lucene.Net.Replicator
    Assembly: Lucene.Net.Replicator.dll
    Syntax
    public class LocalReplicator : object, IReplicator, IDisposable
    Remarks
    This is a Lucene.NET EXPERIMENTAL API, use at your own risk

    Fields

    | Improve this Doc View Source

    DEFAULT_SESSION_EXPIRATION_THRESHOLD

    Threshold for expiring inactive sessions. Defaults to 30 minutes.

    Declaration
    public const long DEFAULT_SESSION_EXPIRATION_THRESHOLD = null
    Field Value
    Type Description
    System.Int64

    Properties

    | Improve this Doc View Source

    ExpirationThreshold

    Gets or sets the expiration threshold in milliseconds.

    If a replication session is inactive this long it is automatically expired, and further attempts to operate within this session will throw a SessionExpiredException.

    Declaration
    public virtual long ExpirationThreshold { get; set; }
    Property Value
    Type Description
    System.Int64

    Methods

    | Improve this Doc View Source

    CheckForUpdate(String)

    Declaration
    public virtual SessionToken CheckForUpdate(string currentVersion)
    Parameters
    Type Name Description
    System.String currentVersion
    Returns
    Type Description
    SessionToken
    | Improve this Doc View Source

    Dispose()

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Dispose(Boolean)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    | Improve this Doc View Source

    EnsureOpen()

    Ensure that replicator is still open, or throw otherwise.

    Declaration
    protected void EnsureOpen()
    | Improve this Doc View Source

    ObtainFile(String, String, String)

    Declaration
    public virtual Stream ObtainFile(string sessionId, string source, string fileName)
    Parameters
    Type Name Description
    System.String sessionId
    System.String source
    System.String fileName
    Returns
    Type Description
    Stream
    | Improve this Doc View Source

    Publish(IRevision)

    Declaration
    public virtual void Publish(IRevision revision)
    Parameters
    Type Name Description
    IRevision revision
    | Improve this Doc View Source

    Release(String)

    Declaration
    public virtual void Release(string sessionId)
    Parameters
    Type Name Description
    System.String sessionId

    Implements

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