Project

General

Profile

Revision d3752fac

IDd3752fac9b288121919f8b1bfd87685df82c3f66
Parent 4bcc10d3
Child 541f08b0

Added by Andreas Kohlbecker almost 3 years ago

TransmissionEngineDistribution: setting lower min heap requirements for tests

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/description/TransmissionEngineDistribution.java
161 161
    private static final int BATCH_SIZE_BY_AREA = 1000;
162 162
    private static final int BATCH_SIZE_BY_RANK = 500;
163 163

  
164
    private long batchMinFreeHeap = BATCH_MIN_FREE_HEAP;
165

  
164 166

  
165 167

  
166 168
    /**
......
452 454
     */
453 455
    protected void accumulateByArea(List<NamedArea> superAreas, ClassificationLookupDTO classificationLookupDao,  IProgressMonitor subMonitor, boolean doClearDescriptions) throws JvmLimitsException {
454 456

  
455
        DynamicBatch batch = new DynamicBatch(BATCH_SIZE_BY_AREA, BATCH_MIN_FREE_HEAP);
457
        DynamicBatch batch = new DynamicBatch(BATCH_SIZE_BY_AREA, batchMinFreeHeap);
456 458
        batch.setRequiredFreeHeap(BATCH_FREE_HEAP_RATIO);
457 459

  
458 460
        TransactionStatus txStatus = startTransaction(false);
......
577 579
    */
578 580
    protected void accumulateByRank(List<Rank> rankInterval, ClassificationLookupDTO classificationLookupDao,  IProgressMonitor subMonitor, boolean doClearDescriptions) throws JvmLimitsException {
579 581

  
580
        DynamicBatch batch = new DynamicBatch(BATCH_SIZE_BY_RANK, BATCH_MIN_FREE_HEAP);
582
        DynamicBatch batch = new DynamicBatch(BATCH_SIZE_BY_RANK, batchMinFreeHeap);
581 583
        batch.setRequiredFreeHeap(BATCH_FREE_HEAP_RATIO);
582 584
        batch.setMaxAllowedGcIncreases(10);
583 585

  
......
1072 1074
        }
1073 1075
    }
1074 1076

  
1077
    /**
1078
     * @return the batchMinFreeHeap
1079
     */
1080
    public long getBatchMinFreeHeap() {
1081
        return batchMinFreeHeap;
1082
    }
1083

  
1084
    /**
1085
     * @param batchMinFreeHeap the batchMinFreeHeap to set
1086
     */
1087
    public void setBatchMinFreeHeap(long batchMinFreeHeap) {
1088
        this.batchMinFreeHeap = batchMinFreeHeap;
1089
    }
1090

  
1075 1091
    public enum AggregationMode {
1076 1092
        byAreas,
1077 1093
        byRanks,
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/TransmissionEngineDistributionTest.java
137 137
        book_b = ReferenceFactory.newBook();
138 138
        book_b.setTitle("book_a");
139 139

  
140
        engine.setBatchMinFreeHeap(100 * 1024 * 1024);
140 141
        engine.updatePriorities();
141 142
    }
142 143

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)