Class CachedDateFormatStrategy

java.lang.Object
com.restfb.util.CachedDateFormatStrategy
All Implemented Interfaces:
DateFormatStrategy

public class CachedDateFormatStrategy extends Object implements DateFormatStrategy
a DateFormat strategy that returns a cached SimpleDateFormat instance.

For every format string an instance of the SimpleDateFormat is saved on a per thread base, so the SimpleDateFormat instance is reused and you get an major speedup.

Attention: to prevent a possible memory leak while using this strategy you have to clean up the inner ThreadLocal with the clearThreadLocal method.

Since:
1.7.0