- 类型参数:
T- event implementation storing the data for sharing during exchange or parallel coordination of an event.
public interface EventFactory<T>
RingBuffer使用
newInstance()预创建对象预填充共享数据区。
创建的实际是数据的载体对象,载体对象是反复使用的,因此存在短时间的内存泄漏风险。
因此最好是消费事件以后清理数据,以避免内存泄漏和帮助垃圾回收。
Called by the RingBuffer to pre-populate all the events to fill the RingBuffer.
-
方法概要
-
方法详细资料
-
newInstance
T newInstance()
-