Package io.riemann.riemann.client
Class RiemannBatchClient
java.lang.Object
io.riemann.riemann.client.RiemannBatchClient
- All Implemented Interfaces:
AsynchronousTransport,IRiemannClient,Transport,AutoCloseable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intfinal AtomicIntegerfinal IRiemannClientfinal AtomicLong -
Constructor Summary
ConstructorsConstructorDescriptionRiemannBatchClient(IRiemannClient client) RiemannBatchClient(IRiemannClient client, int batchSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidconnect()event()voidflush()intflush2()booleanvoidqueue(RiemannBatchClient.Write write) voidsendEvent(Proto.Event event) sendEvents(Proto.Event... events) sendEvents(List<Proto.Event> events) sendException(String service, Throwable t) sendMessage(Proto.Msg message)
-
Field Details
-
batchSize
public final int batchSize -
bufferSize
-
buffer
-
client
-
readPromiseTimeout
-
-
Constructor Details
-
RiemannBatchClient
- Throws:
UnsupportedJVMException
-
RiemannBatchClient
- Throws:
UnsupportedJVMException
-
-
Method Details
-
sendMessage
- Specified by:
sendMessagein interfaceAsynchronousTransport
-
sendEvents
- Specified by:
sendEventsin interfaceIRiemannClient
-
sendEvents
- Specified by:
sendEventsin interfaceIRiemannClient
-
sendEvent
- Specified by:
sendEventin interfaceIRiemannClient
-
sendException
- Specified by:
sendExceptionin interfaceIRiemannClient
-
query
- Specified by:
queryin interfaceIRiemannClient
-
event
- Specified by:
eventin interfaceIRiemannClient
-
queue
-
flush2
public int flush2() -
flush
public void flush() -
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceTransport
-
connect
- Specified by:
connectin interfaceTransport- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceTransport
-
reconnect
- Specified by:
reconnectin interfaceTransport- Throws:
IOException
-
transport
-