Package net.logstash.logback.util
Interface ThreadLocalHolder.Lifecycle
- Enclosing class:
- ThreadLocalHolder<T>
public static interface ThreadLocalHolder.Lifecycle
Optional interface that pooled instances may implement if they wish to be notified of
life cycle events.
-
Method Summary
-
Method Details
-
recycle
default boolean recycle()Indicate whether the instance can be recycled and returned to the pool and perform the necessary recycling tasks.- Returns:
true
if the instance can be returned to the pool,false
if it must be disposed instead.
-
dispose
default void dispose()Dispose the instance and free allocated resources.
-