Olivier
You could use a thread local or model your producers such that you
have one per thread and each owns an instance of the translator.
> Actually when we calling a mothod,we may create lots of objects and
> these objects will be clean after finishing the method.
> So,Is that really important to reuse the event instances in
> ringbuffer?
The Disruptor does not proscribe that you much build zero garbage
systems and always reuse the data inside of the event. The point of
the Disruptor is that it allows you to choose and makes is possible to
build systems that are very memory efficient. Existing messaging
libraries push you toward immutable objects as the main way to move
data between threads and the Disruptor supports that too, if that is
the most appropriate solution.
Mike