Skip to content

Instantly share code, notes, and snippets.

View fteychene's full-sized avatar

Francois Teychene fteychene

View GitHub Profile
@fteychene
fteychene / Batcher.java
Created December 18, 2015 15:16
Sample of structure for Batcher
public class Batcher {
static class Flusher implements Runnable {
private ConcurrentLinkedQueue<Events.Event> queu = new ConcurrentLinkedQueue<>();
@Override
public void run() {
// Flush with defined interval or with special rules
}
@fteychene
fteychene / ProtobufMain.java
Created December 18, 2015 14:12
Test protobuf and Chronicle for events
package fte.tests.chronicle;
import com.cognitect.transit.Reader;
import com.cognitect.transit.TransitFactory;
import com.cognitect.transit.Writer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.guava.GuavaModule;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import net.openhft.chronicle.Chronicle;
import net.openhft.chronicle.ChronicleQueueBuilder;