Class PerSessionDirectoryFactory
A ISourceDirectoryFactory which returns Lucene.Net.Store.FSDirectory under a dedicated session directory. When a session is over, the entire directory is deleted.
Implements
Inherited Members
Namespace: Lucene.Net.Replicator
Assembly: Lucene.Net.Replicator.dll
Syntax
public class PerSessionDirectoryFactory : ISourceDirectoryFactory
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Constructors
PerSessionDirectoryFactory(string)
Constructor with the given sources mapping.
Declaration
public PerSessionDirectoryFactory(string workingDirectory)
Parameters
Type | Name | Description |
---|---|---|
string | workingDirectory |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Methods
CleanupSession(string)
Called to denote that the replication actions for this session were finished and the directory is no longer needed.
Declaration
public virtual void CleanupSession(string sessionId)
Parameters
Type | Name | Description |
---|---|---|
string | sessionId |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Exceptions
Type | Condition |
---|---|
IOException |
GetDirectory(string, string)
Returns the Lucene.Net.Store.Directory to use for the given session and source. Implementations may e.g. return different directories for different sessions, or the same directory for all sessions. In that case, it is advised to clean the directory before it is used for a new session.
Declaration
public virtual Directory GetDirectory(string sessionId, string source)
Parameters
Type | Name | Description |
---|---|---|
string | sessionId | |
string | source |
Returns
Type | Description |
---|---|
Directory |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Exceptions
Type | Condition |
---|---|
IOException |