Search in sources :

Example 11 with Buffer

use of org.komamitsu.fluency.buffer.Buffer in project fluency by komamitsu.

the class FluencyBuilder method createFluency.

@VisibleForTesting
public Fluency createFluency(RecordFormatter recordFormatter, Ingester ingester, Buffer.Config bufferConfig, Flusher.Config flusherConfig) {
    Buffer buffer = new Buffer(bufferConfig, recordFormatter);
    Flusher flusher = new Flusher(flusherConfig, buffer, ingester);
    return new Fluency(buffer, flusher);
}
Also used : Buffer(org.komamitsu.fluency.buffer.Buffer) Flusher(org.komamitsu.fluency.flusher.Flusher) VisibleForTesting(org.msgpack.core.annotations.VisibleForTesting)

Aggregations

Buffer (org.komamitsu.fluency.buffer.Buffer)11 Flusher (org.komamitsu.fluency.flusher.Flusher)9 Test (org.junit.jupiter.api.Test)8 ByteBuffer (java.nio.ByteBuffer)6 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)6 Fluency (org.komamitsu.fluency.Fluency)3 HashMap (java.util.HashMap)2 CountDownLatch (java.util.concurrent.CountDownLatch)2 CsvSource (org.junit.jupiter.params.provider.CsvSource)2 JsonRecordFormatter (org.komamitsu.fluency.JsonRecordFormatter)2 ImmutableMap (com.google.common.collect.ImmutableMap)1 IOException (java.io.IOException)1 InetSocketAddress (java.net.InetSocketAddress)1 Map (java.util.Map)1 BlockingQueue (java.util.concurrent.BlockingQueue)1 TimeUnit (java.util.concurrent.TimeUnit)1 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)1 Matchers.is (org.hamcrest.Matchers.is)1 Assertions.assertFalse (org.junit.jupiter.api.Assertions.assertFalse)1 Assertions.assertTrue (org.junit.jupiter.api.Assertions.assertTrue)1