public class ThreadSafeSimpleDateFormat extends Object
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.
Constructor and Description |
---|
ThreadSafeSimpleDateFormat(String format,
int initialPoolSize,
int maxPoolSize,
boolean lenient) |
public ThreadSafeSimpleDateFormat(String format, int initialPoolSize, int maxPoolSize, boolean lenient)
public Date parse(String date) throws ParseException
ParseException
Copyright © 2016 Internet2. All rights reserved.