Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Allow default cache sizes of Variables to be modified by user. #874

Merged
merged 1 commit into from
Jul 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cdm/src/main/java/ucar/nc2/Variable.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public class Variable extends CDMNode implements VariableIF, ProxyReader, Attrib
*/
static public boolean permitCaching = true;

static public final int defaultSizeToCache = 4000; // bytes cache any variable whose size() < defaultSizeToCache
static public final int defaultCoordsSizeToCache = 40 * 1000; // bytes cache coordinate variable whose size() < defaultSizeToCache
static public int defaultSizeToCache = 4000; // bytes cache any variable whose size() < defaultSizeToCache
static public int defaultCoordsSizeToCache = 40 * 1000; // bytes cache coordinate variable whose size() < defaultSizeToCache

static protected boolean debugCaching = false;
static private org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(Variable.class);
Expand Down
4 changes: 2 additions & 2 deletions cdm/src/main/java/ucar/nc2/dataset/CoordinateAxis.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

public class CoordinateAxis extends VariableDS {
static private org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(CoordinateAxis.class);
static private final int axisSizeToCache = 100 * 1000; // bytes
static public int axisSizeToCache = 100 * 1000; // bytes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose there is no way to make this package private? If not, that's ok, just checking to make sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not if we want the user to easily be able to modify it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, no worries.


protected NetcdfDataset ncd; // container dataset
protected AxisType axisType = null;
Expand Down Expand Up @@ -421,4 +421,4 @@ public boolean isCoordinateVariable() {
return true;
}

}
}