public class RiemannBatchClient extends AbstractRiemannClient
| Modifier and Type | Class and Description |
|---|---|
class |
RiemannBatchClient.Write |
| Modifier and Type | Field and Description |
|---|---|
int |
batchSize |
Promise<Boolean> |
blackhole |
LinkedTransferQueue<RiemannBatchClient.Write> |
buffer |
AtomicInteger |
bufferSize |
AbstractRiemannClient |
client |
AtomicLong |
readPromiseTimeout |
scheduler| Constructor and Description |
|---|
RiemannBatchClient(AbstractRiemannClient client) |
RiemannBatchClient(int batchSize,
AbstractRiemannClient client) |
| Modifier and Type | Method and Description |
|---|---|
IPromise<Proto.Msg> |
aSendMaybeRecvMessage(Proto.Msg message) |
IPromise<Proto.Msg> |
aSendRecvMessage(Proto.Msg message) |
void |
connect() |
void |
disconnect() |
void |
flush() |
int |
flush2() |
boolean |
isConnected() |
void |
queue(RiemannBatchClient.Write write) |
void |
reconnect() |
void |
sendEvents(List<Proto.Event> events) |
Boolean |
sendEventsWithAck(List<Proto.Event> events) |
Proto.Msg |
sendMaybeRecvMessage(Proto.Msg message) |
Proto.Msg |
sendRecvMessage(Proto.Msg message) |
aSendEventsWithAck, aSendEventsWithAck, event, every, every, every, every, every, every, every, every, query, scheduler, sendEvents, sendEventsWithAck, sendException, validatepublic final int batchSize
public final AtomicInteger bufferSize
public final LinkedTransferQueue<RiemannBatchClient.Write> buffer
public final AbstractRiemannClient client
public final AtomicLong readPromiseTimeout
public RiemannBatchClient(AbstractRiemannClient client) throws UnknownHostException, UnsupportedJVMException
public RiemannBatchClient(int batchSize,
AbstractRiemannClient client)
throws UnknownHostException,
UnsupportedJVMException
public void sendEvents(List<Proto.Event> events)
sendEvents in class AbstractRiemannClientpublic Boolean sendEventsWithAck(List<Proto.Event> events) throws IOException, ServerError, MsgTooLargeException
sendEventsWithAck in class AbstractRiemannClientIOExceptionServerErrorMsgTooLargeExceptionpublic void queue(RiemannBatchClient.Write write) throws IOException
IOExceptionpublic int flush2()
public void flush()
throws IOException
flush in interface Transportflush in class AbstractRiemannClientIOExceptionpublic Proto.Msg sendRecvMessage(Proto.Msg message) throws IOException
sendRecvMessage in interface SynchronousTransportsendRecvMessage in class AbstractRiemannClientIOExceptionpublic Proto.Msg sendMaybeRecvMessage(Proto.Msg message) throws IOException
sendMaybeRecvMessage in interface SynchronousTransportsendMaybeRecvMessage in class AbstractRiemannClientIOExceptionpublic IPromise<Proto.Msg> aSendRecvMessage(Proto.Msg message)
aSendRecvMessage in interface AsynchronousTransportaSendRecvMessage in class AbstractRiemannClientpublic IPromise<Proto.Msg> aSendMaybeRecvMessage(Proto.Msg message)
aSendMaybeRecvMessage in interface AsynchronousTransportaSendMaybeRecvMessage in class AbstractRiemannClientpublic boolean isConnected()
isConnected in interface TransportisConnected in class AbstractRiemannClientpublic void connect()
throws IOException
connect in interface Transportconnect in class AbstractRiemannClientIOExceptionpublic void disconnect()
throws IOException
disconnect in interface Transportdisconnect in class AbstractRiemannClientIOExceptionpublic void reconnect()
throws IOException
reconnect in interface Transportreconnect in class AbstractRiemannClientIOExceptionCopyright © 2014. All rights reserved.