Package com.restfb.util
Klasse CachedDateFormatStrategy
java.lang.Object
com.restfb.util.CachedDateFormatStrategy
- Alle implementierten Schnittstellen:
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.- Seit:
- 1.7.0
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
fetch the DateFormat instance that is used to parse a date in the DateUtils
-
Konstruktordetails
-
CachedDateFormatStrategy
public CachedDateFormatStrategy()
-
-
Methodendetails
-
formatFor
Beschreibung aus Schnittstelle kopiert:DateFormatStrategy
fetch the DateFormat instance that is used to parse a date in the DateUtils- Angegeben von:
formatFor
in SchnittstelleDateFormatStrategy
- Parameter:
format
- the format pattern as string- Gibt zurück:
- a DateFormat instance
-
clearThreadLocal
-