|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.util.StringCache
public class StringCache
The string cache helps re-use string objects and therefore save memory. It uses a soft reference cache to keep frequently used strings in memory. The effect is similar to calling String.intern(), but faster.
Method Summary | |
---|---|
static void |
clearCache()
Clear the cache. |
static java.lang.String |
get(java.lang.String s)
Get the string from the cache if possible. |
static java.lang.String |
getNew(java.lang.String s)
Get a string from the cache, and if no such string has been found, create a new one with only this content. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String get(java.lang.String s)
s
- the original string
public static java.lang.String getNew(java.lang.String s)
s
- the string
public static void clearCache()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |