|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.replicator.PerSessionDirectoryFactory
public class PerSessionDirectoryFactory
A ReplicationClient.SourceDirectoryFactory
which returns FSDirectory
under a
dedicated session directory. When a session is over, the entire directory is
deleted.
Constructor Summary | |
---|---|
PerSessionDirectoryFactory(File workDir)
Constructor with the given sources mapping. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PerSessionDirectoryFactory(File workDir)
Method Detail |
---|
public Directory getDirectory(String sessionID, String source) throws IOException
ReplicationClient.SourceDirectoryFactory
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.
getDirectory
in interface ReplicationClient.SourceDirectoryFactory
IOException
ReplicationClient.SourceDirectoryFactory.cleanupSession(String)
public void cleanupSession(String sessionID) throws IOException
ReplicationClient.SourceDirectoryFactory
cleanupSession
in interface ReplicationClient.SourceDirectoryFactory
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |