Interface IReplicator
An interface for replicating files. Allows a producer to Publish(IRevision) IRevisions and consumers to CheckForUpdate(String). When a client needs to be updated, it is given a SessionToken through which it can ObtainFile(String, String, String) the files of that revision. After the client has finished obtaining all the files, it should Release(String) the given session, so that the files can be reclaimed if they are not needed anymore.
A client is always updated to the newest revision available. That is, if a client is on revision r1 and revisions r2 and r3 were published, then when the client will next check for update, it will receive r3.
Assembly: Lucene.Net.Replicator.dll
Syntax
public interface IReplicator : IDisposable
Remarks
@lucene.experimental
Methods
Name | Description |
---|---|
CheckForUpdate(String) | Check whether the given version is up-to-date and returns a
SessionToken which can be used for fetching the revision files,
otherwise returns |
ObtainFile(String, String, String) | Returns an |
Publish(IRevision) | Publish a new IRevision for consumption by clients. It is the caller's responsibility to verify that the revision files exist and can be read by clients. When the revision is no longer needed, it will be Release(String)d by the replicator. |
Release(String) | Notify that the specified SessionToken is no longer needed by the caller. |