Search in sources :

Example 1 with StagingDataWriter

use of org.jumpmind.symmetric.io.data.writer.StagingDataWriter in project symmetric-ds by JumpMind.

the class DataExtractorService method wrapWithTransformWriter.

protected IDataWriter wrapWithTransformWriter(Node sourceNode, Node targetNode, ProcessInfo processInfo, IDataWriter dataWriter, boolean useStagingDataWriter) {
    TransformWriter transformExtractWriter = null;
    if (useStagingDataWriter) {
        long memoryThresholdInBytes = parameterService.getLong(ParameterConstants.STREAM_TO_FILE_THRESHOLD);
        transformExtractWriter = createTransformDataWriter(sourceNode, targetNode, new ProcessInfoDataWriter(new StagingDataWriter(memoryThresholdInBytes, true, nodeService.findIdentityNodeId(), Constants.STAGING_CATEGORY_OUTGOING, stagingManager), processInfo));
    } else {
        transformExtractWriter = createTransformDataWriter(sourceNode, targetNode, new ProcessInfoDataWriter(dataWriter, processInfo));
    }
    return transformExtractWriter;
}
Also used : StagingDataWriter(org.jumpmind.symmetric.io.data.writer.StagingDataWriter) TransformWriter(org.jumpmind.symmetric.io.data.writer.TransformWriter) ProcessInfoDataWriter(org.jumpmind.symmetric.model.ProcessInfoDataWriter)

Aggregations

StagingDataWriter (org.jumpmind.symmetric.io.data.writer.StagingDataWriter)1 TransformWriter (org.jumpmind.symmetric.io.data.writer.TransformWriter)1 ProcessInfoDataWriter (org.jumpmind.symmetric.model.ProcessInfoDataWriter)1