org.apache.tomcat.util.buf
public class StringCache extends Object
Nested Class Summary | |
---|---|
static class | StringCache.ByteEntry |
static class | StringCache.CharEntry |
Field Summary | |
---|---|
protected static int | accessCount
Access count. |
protected static StringCache.ByteEntry[] | bcCache
Cache for byte chunk. |
protected static int | bcCount
toString count for byte chunk. |
protected static HashMap | bcStats
Statistics hash map for byte chunk. |
protected static boolean | byteEnabled
Enabled ? |
protected static int | cacheSize |
protected static StringCache.CharEntry[] | ccCache
Cache for char chunk. |
protected static int | ccCount
toString count for char chunk. |
protected static HashMap | ccStats
Statistics hash map for char chunk. |
protected static boolean | charEnabled |
protected static int | hitCount
Hit count. |
protected static int | maxStringSize |
protected static int | trainThreshold |
Method Summary | |
---|---|
protected static int | compare(ByteChunk name, byte[] compareTo)
Compare given byte chunk with byte array.
|
protected static int | compare(CharChunk name, char[] compareTo)
Compare given char chunk with char array.
|
protected static String | find(ByteChunk name)
Find an entry given its name in the cache and return the associated String. |
protected static String | find(CharChunk name)
Find an entry given its name in the cache and return the associated String. |
protected static int | findClosest(ByteChunk name, StringCache.ByteEntry[] array, int len)
Find an entry given its name in a sorted array of map elements.
|
protected static int | findClosest(CharChunk name, StringCache.CharEntry[] array, int len)
Find an entry given its name in a sorted array of map elements.
|
int | getAccessCount() |
boolean | getByteEnabled() |
int | getCacheSize() |
boolean | getCharEnabled() |
int | getHitCount() |
int | getTrainThreshold() |
void | reset() |
void | setByteEnabled(boolean byteEnabled) |
void | setCacheSize(int cacheSize) |
void | setCharEnabled(boolean charEnabled) |
void | setTrainThreshold(int trainThreshold) |
static String | toString(ByteChunk bc) |
static String | toString(CharChunk cc) |
Returns: Returns the accessCount.
Returns: Returns the enabled.
Returns: Returns the cacheSize.
Returns: Returns the enabled.
Returns: Returns the hitCount.
Returns: Returns the trainThreshold.
Parameters: byteEnabled The enabled to set.
Parameters: cacheSize The cacheSize to set.
Parameters: charEnabled The enabled to set.
Parameters: trainThreshold The trainThreshold to set.