org.hsqldb.map
Class ValuePool
- java.lang.Object
-
- org.hsqldb.map.ValuePool
-
public class ValuePool extends java.lang.ObjectSupports pooling of Integer, Long, Double, BigDecimal, String and Date Java Objects. Leads to reduction in memory use when an Object is used more then twice in the database. getXXX methods are used for retrival of values. If a value is not in the pool, it is added to the pool and returned. When the pool gets full, half the contents that have been accessed less recently are purged.- Since:
- 1.7.2
-
-
Field Summary
Fields Modifier and Type Field and Description static java.math.BigDecimalBIG_DECIMAL_0static java.math.BigDecimalBIG_DECIMAL_1static int[]emptyIntArraystatic java.lang.Object[]emptyObjectArraystatic java.lang.String[]emptyStringArraystatic java.lang.IntegerINTEGER_0static java.lang.IntegerINTEGER_1static java.lang.IntegerINTEGER_2static java.lang.IntegerINTEGER_MAXstatic java.lang.StringspaceString
-
Constructor Summary
Constructors Constructor and Description ValuePool()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidclearPool()static java.math.BigDecimalgetBigDecimal(java.math.BigDecimal val)static java.lang.BooleangetBoolean(boolean b)static java.lang.DoublegetDouble(long val)static java.lang.IntegergetInt(int val)static java.lang.LonggetLong(long val)static intgetMaxStringLength()static java.lang.StringgetString(java.lang.String val)static java.lang.StringgetSubString(java.lang.String val, int start, int limit)static voidresetPool()static voidresetPool(int[] sizeArray, int sizeFactor)
-
-
-
Field Detail
-
INTEGER_0
public static final java.lang.Integer INTEGER_0
-
INTEGER_1
public static final java.lang.Integer INTEGER_1
-
INTEGER_2
public static final java.lang.Integer INTEGER_2
-
INTEGER_MAX
public static final java.lang.Integer INTEGER_MAX
-
BIG_DECIMAL_0
public static final java.math.BigDecimal BIG_DECIMAL_0
-
BIG_DECIMAL_1
public static final java.math.BigDecimal BIG_DECIMAL_1
-
emptyStringArray
public static final java.lang.String[] emptyStringArray
-
emptyObjectArray
public static final java.lang.Object[] emptyObjectArray
-
emptyIntArray
public static final int[] emptyIntArray
-
spaceString
public static java.lang.String spaceString
-
-
Method Detail
-
getMaxStringLength
public static int getMaxStringLength()
-
resetPool
public static void resetPool(int[] sizeArray, int sizeFactor)
-
resetPool
public static void resetPool()
-
clearPool
public static void clearPool()
-
getInt
public static java.lang.Integer getInt(int val)
-
getLong
public static java.lang.Long getLong(long val)
-
getDouble
public static java.lang.Double getDouble(long val)
-
getString
public static java.lang.String getString(java.lang.String val)
-
getSubString
public static java.lang.String getSubString(java.lang.String val, int start, int limit)
-
getBigDecimal
public static java.math.BigDecimal getBigDecimal(java.math.BigDecimal val)
-
getBoolean
public static java.lang.Boolean getBoolean(boolean b)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG