com.lmax
disruptor
3.3.4
public class PCData {
private long value;
public long getValue() {
return value;
}
public void setValue(long value) {
this.value = value;
}
}
public class PCDataFactory implements EventFactory {
@Override
public PCData newInstance() {
return new PCData();
}
}
public class Producer {
private final RingBuffer ringBuffer;
public Producer(RingBuffer ringBuffer) {
this.ringBuffer = ringBuffer;
}
public void pushData(ByteBuffer byteBuffer){
long sequence = ringBuffer.next();
try{
PCData event = ringBuffer.get(sequence);
event.setValue(byteBuffer.getLong(0));
}finally {
ringBuffe