Skip to content

Commit

Permalink
Redefined 'beam.imageManager.enableSourceTileCaching' as 'beam.imageM…
Browse files Browse the repository at this point in the history
…anager.disableSourceTileCaching' with default value 'false'
  • Loading branch information
mzuehlke committed Apr 25, 2012
1 parent e474902 commit d66a538
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
4 changes: 2 additions & 2 deletions beam-core/src/main/java/org/esa/beam/jai/BandOpImage.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 Brockmann Consult GmbH ([email protected])
* Copyright (C) 2012 Brockmann Consult GmbH ([email protected])
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down Expand Up @@ -37,7 +37,7 @@ public BandOpImage(Band band) {

public BandOpImage(Band band, ResolutionLevel level) {
super(band, level);
if (!Boolean.getBoolean("beam.imageManager.enableSourceTileCaching")) {
if (Boolean.getBoolean("beam.imageManager.disableSourceTileCaching")) {
setTileCache(null);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 Brockmann Consult GmbH ([email protected])
* Copyright (C) 2012 Brockmann Consult GmbH ([email protected])
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down Expand Up @@ -52,22 +52,12 @@ public class RasterDataNodeIOTest extends TestCase {
private Product p;
private TestProductReader pr;
private Rectangle rectangle;
private String enableSourceTileCachingOld;

@Override
protected void setUp() {
p = createTestProduct();
pr = (TestProductReader) p.getProductReader();
rectangle = new Rectangle(0, 0, SW, SH);
enableSourceTileCachingOld = System.getProperty("beam.imageManager.enableSourceTileCaching");
System.setProperty("beam.imageManager.enableSourceTileCaching", "true");
}

@Override
public void tearDown() throws Exception {
if (enableSourceTileCachingOld != null) {
System.setProperty("beam.imageManager.enableSourceTileCaching", enableSourceTileCachingOld);
}
}

public void testThatSourceImagesGeneratedForBandsAreCached() throws IOException {
Expand Down
7 changes: 3 additions & 4 deletions src/main/config/beam.config
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,9 @@ beam.splash.taskLabel.pos = 122,115
# beam.imageManager.enableIntermediateTileCaching = true

# Controls caching of source image tiles generated by EO data readers (since BEAM 4.10).
# The default value is 'false', meaning that no source tile caching takes place.
# You may want to enable source tile caching if you mostly use EO data file located in
# generally slower file systems such as NFS whose performance is limited by network bandwidth.
# beam.imageManager.enableSourceTileCaching = true
# The default value is 'false', meaning that source tile caching takes place.
# You may want to disable source tile caching if you are low on memory.
# beam.imageManager.disableSourceTileCaching = true

# Specifies an observer for tile computations occurring during processing using the BEAM
# Graph Processing Framework (GPF).
Expand Down

0 comments on commit d66a538

Please sign in to comment.