Some types of DSet may be okay with larger sizes before warning, break out the cutoff so we can override.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6046 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Mike Thomas
2010-03-18 16:49:38 +00:00
parent 7eb35b5dc1
commit 5ecfff4bcb
@@ -320,7 +320,7 @@ public class DSet<E extends DSet.Entry>
int elength = _entries.length;
if (_size >= elength) {
// sanity check
if (elength > 2048) {
if (elength > getWarningSize()) {
log.warning("Requested to expand to questionably large size", "l", elength,
new Exception());
}
@@ -425,6 +425,14 @@ public class DSet<E extends DSet.Entry>
}
}
/**
* Returns the minimum size where we should warn that we're getting a bit large.
*/
protected int getWarningSize ()
{
return 2048;
}
/**
* Generates a shallow copy of this object in a type safe manner.
*