Class RingBufferLogEventTranslator

  • All Implemented Interfaces:
    com.lmax.disruptor.EventTranslator<RingBufferLogEvent>

    public class RingBufferLogEventTranslator
    extends java.lang.Object
    implements com.lmax.disruptor.EventTranslator<RingBufferLogEvent>
    This class is responsible for writing elements that make up a log event into the ringbuffer RingBufferLogEvent. After this translator populated the ringbuffer event, the disruptor will update the sequence number so that the event can be consumed by another thread.

    Usage note: This class is only used on the thread that created it.

    • Field Detail

      • loggerName

        java.lang.String loggerName
      • marker

        protected Marker marker
      • fqcn

        protected java.lang.String fqcn
      • level

        protected Level level
      • message

        protected Message message
      • thrown

        protected java.lang.Throwable thrown
      • location

        private java.lang.StackTraceElement location
      • clock

        private Clock clock
      • threadId

        private long threadId
      • threadName

        private java.lang.String threadName
      • threadPriority

        private int threadPriority
    • Constructor Detail

      • RingBufferLogEventTranslator

        public RingBufferLogEventTranslator()
    • Method Detail

      • translateTo

        public void translateTo​(RingBufferLogEvent event,
                                long sequence)
        Specified by:
        translateTo in interface com.lmax.disruptor.EventTranslator<RingBufferLogEvent>
      • clear

        void clear()
        Release references held by this object to allow objects to be garbage-collected.
      • updateThreadValues

        @Deprecated
        public void updateThreadValues()
        Deprecated.
        since 2.25.0. RingBufferLogEventTranslator instances should only be used on the thread that created it.