Skip to content
Snippets Groups Projects
Commit 97aef935 authored by cramakri's avatar cramakri
Browse files

LMS-2739 Add a switch to turn on/off the pre-staging folder. It is now off by default

SVN: 24238
parent 7e21c408
No related branches found
No related tags found
No related merge requests found
......@@ -244,6 +244,11 @@ public abstract class AbstractOmniscientTopLevelDataSetRegistrator<T extends Dat
}
/**
* Should registration take advantage of the prestaging area?
*/
private final static boolean USE_PRE_STAGING = false;
public static class NoOpDelegate implements ITopLevelDataSetRegistratorDelegate
{
......@@ -340,11 +345,18 @@ public abstract class AbstractOmniscientTopLevelDataSetRegistrator<T extends Dat
markerFileCleanupAction = new DoNothingDelegatedAction();
}
// Make a hardlink copy of the file
File copyOfIncoming = copyIncomingFileToPreStaging(incomingDataSetFile);
PostRegistrationCleanUpAction cleanupAction = new PostRegistrationCleanUpAction(incomingDataSetFile, copyOfIncoming, markerFileCleanupAction);
if (USE_PRE_STAGING)
{
// Make a hardlink copy of the file
File copyOfIncoming = copyIncomingFileToPreStaging(incomingDataSetFile);
PostRegistrationCleanUpAction cleanupAction = new PostRegistrationCleanUpAction(incomingDataSetFile, copyOfIncoming, markerFileCleanupAction);
handle(copyOfIncoming, null, new NoOpDelegate(), cleanupAction);
handle(copyOfIncoming, null, new NoOpDelegate(), cleanupAction);
} else
{
handle(incomingDataSetFile, null, new NoOpDelegate(), markerFileCleanupAction);
}
}
private File copyIncomingFileToPreStaging(File incomingDataSetFile)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment