Class FormatThreadLocal<T extends Format>

  • Type Parameters:
    T - the type of formatter to provide

    public class FormatThreadLocal<T extends Format>
    extends ThreadLocal<T>
    Thread local implementation to use prototypes of Format subclasses that are not thread safe by themselves. Use ThreadLocal.get() on an instance of this class to get a thread local formatter instance.
    • Constructor Detail

      • FormatThreadLocal

        public FormatThreadLocal​(T prototype)
        Create a new thread local formatter generator.
        Parameters:
        prototype - prototype to use when getting a formatter