edu.internet2.middleware.grouperClientExt.com.thoughtworks.xstream.core.util
Class ThreadSafeSimpleDateFormat
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.thoughtworks.xstream.core.util.ThreadSafeSimpleDateFormat
- Direct Known Subclasses:
- ThreadSafeSimpleDateFormat
public class ThreadSafeSimpleDateFormat
- extends Object
Wrapper around java.text.SimpleDateFormat that can
be called by multiple threads concurrently.
SimpleDateFormat has a high overhead in creating
and is not thread safe. To make best use of resources,
the ThreadSafeSimpleDateFormat provides a dynamically
sizing pool of instances, each of which will only
be called by a single thread at a time.
The pool has a maximum capacity, to limit overhead.
If all instances in the pool are in use and another is
required, it shall block until one becomes available.
- Author:
- Joe Walnes, Jörg Schaible
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadSafeSimpleDateFormat
public ThreadSafeSimpleDateFormat(String format,
int initialPoolSize,
int maxPoolSize,
boolean lenient)
format
public String format(Date date)
parse
public Date parse(String date)
throws ParseException
- Throws:
ParseException
Copyright © 2010 Internet2. All Rights Reserved.