org.apache.lucene.replicator

## Interface ReplicationClient.SourceDirectoryFactory

All Known Implementing Classes:
  PerSessionDirectoryFactory

Enclosing class:
  ReplicationClient

    public static interface ReplicationClient.SourceDirectoryFactory

Resolves a session and source into a `Directory` to use for copying the session files to.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `cleanupSession(String sessionID)` Called to denote that the replication actions for this session were finished and the directory is no longer needed.
`Directory` `getDirectory(String sessionID, String source)` Returns the `Directory` to use for the given session and source.

### Method Detail

#### cleanupSession

    void cleanupSession(String sessionID)
                 throws IOException

Called to denote that the replication actions for this session were finished and the directory is no longer needed.

Throws:
  `IOException`

#### getDirectory

    Directory getDirectory(String sessionID,
                           String source)
                    throws IOException

Returns the `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.

Throws:
  `IOException`
See Also:
  `cleanupSession(String)`