https://martinfowler.com/articles/lmax.htmlで説明したように、私はRingBufferのイベントをまずUnmarchalerで処理し、次にBusiness Logic Processorで処理する必要があります。LMAX Disruptor(unmarchalerからビジネスロジックまで)の下位層のコンシューマ間でデータを渡す?
Disruptor<MyEvent> disruptor = new Disruptor<MyEvent>(MyEvent.FACTORY, 32, Executors.newCachedThreadPool());
EventHandler<MyEvent> handler1 = new EventHandler<MyEvent>() { ... };
EventHandler<MyEvent> handler2 = new EventHandler<MyEvent>() { ... };
disruptor.handleEventsWith(handler1);
disruptor.after(handler1).handleEventsWith(handler2);
(https://lmax-exchange.github.io/disruptor/docs/com/lmax/disruptor/dsl/Disruptor.html)それは同じように構成されているとアイデアがhandler1がunmarchalerで、handler2がhandler1によって処理されたものを消費すること、その後です。
Quesion:どのようにして「アンマーキング」と「ディスラプターに戻す」部分を正確にコーディングできますか?私はこのhttps://groups.google.com/forum/#!topic/lmax-disruptor/q6h5HBEBRUkの説明を見つけましたが、私はかなり理解しませんでした。イベントから
非marchalsいくつかのデータ:イベントは、handler1
void onEvent(T event, long sequence, boolean endOfBatch)
(https://lmax-exchange.github.io/disruptor/docs/com/lmax/disruptor/EventHandler.html javadocの)コールバックに到着されているとします。今度は、unmarchaledオブジェクトを扱うhandler2のイベントにunmarchaledデータを追加する必要があります。
「更新」イベントには何が必要ですか? "イベント"オブジェクトを十分に変更していますか?