|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.util.NonshareableDateFormatCache
public class NonshareableDateFormatCache
This class provides a cache of SimpleDateFormat objects, such that they don't have to be recreated over and over, yet the users can be reasonably assured that no one else is using the instance they are using.
Note this class does not wrap the SimpleDateFormat objects to ensure they are not being used by threads that didn't actually request them. That can be added if problems still occur.
Constructor Summary | |
---|---|
NonshareableDateFormatCache()
|
Method Summary | |
---|---|
static java.text.SimpleDateFormat |
get(java.lang.String format)
Get a SimpleDateFormat object with the specified format, pre-initialized to UTC timezone. |
static void |
release(java.text.SimpleDateFormat sdf)
Return a SimpleDateFormat object to the appropriate queue. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NonshareableDateFormatCache()
Method Detail |
---|
public static java.text.SimpleDateFormat get(java.lang.String format)
format
- format String to use
public static void release(java.text.SimpleDateFormat sdf)
sdf
- SimpleDateFormat object to returnpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |