public class PerSessionDirectoryFactory extends Object implements ReplicationClient.SourceDirectoryFactory
FSDirectoryunder a dedicated session directory. When a session is over, the entire directory is deleted.
|Constructor and Description|
Constructor with the given sources mapping.
|Modifier and Type||Method and Description|
Called to denote that the replication actions for this session were finished and the directory is no longer needed.
public PerSessionDirectoryFactory(Path workDir)
public Directory getDirectory(String sessionID, String source) throws IOException
Directoryto 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.
public void cleanupSession(String sessionID) throws IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.