public class DTMSafeStringPool extends DTMStringPool
Like DTMStringPool, but threadsafe. It's been proposed that DTMs share their string pool(s); that raises threadsafety issues which this addresses. Of course performance is inferior to that of the bare-bones version.
Status: Passed basic test in main().
NULL
Constructor and Description |
---|
DTMSafeStringPool() |
Modifier and Type | Method and Description |
---|---|
String |
indexToString(int i) |
static void |
main(String[] args)
Command-line unit test driver.
|
void |
removeAllElements() |
int |
stringToIndex(String s) |
public void removeAllElements()
removeAllElements
in class DTMStringPool
public String indexToString(int i) throws ArrayIndexOutOfBoundsException
indexToString
in class DTMStringPool
ArrayIndexOutOfBoundsException
- if index doesn't map to a string.public int stringToIndex(String s)
stringToIndex
in class DTMStringPool
public static void main(String[] args)
Copyright © 2021 JBoss by Red Hat. All rights reserved.