public class EventIpcClient<E> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected InetSocketAddress |
address |
protected E |
avroClient |
protected int |
batchSize |
protected ExecutorService |
callTimeoutPool |
protected int |
compressionLevel |
protected long |
connectTimeout |
protected org.cg.common.avro.EventIpcClient.ConnState |
connState
Guarded by
stateLock |
protected boolean |
enableDeflateCompression |
protected boolean |
enableSsl |
protected Class<E> |
exClass |
protected boolean |
isHttp |
protected static org.slf4j.Logger |
logger |
protected long |
requestTimeout |
protected ReentrantLock |
stateLock |
protected URL |
targetUrl |
protected org.apache.avro.ipc.Transceiver |
transceiver |
protected boolean |
trustAllCerts |
protected String |
truststore |
protected String |
truststorePassword |
protected String |
truststoreType |
| Constructor and Description |
|---|
EventIpcClient(Class<E> exClass)
This constructor is intended to be called from
RpcClientFactory. |
| Modifier and Type | Method and Description |
|---|---|
void |
assertReady()
If the connection state != READY, throws
EventDeliveryException. |
void |
close() |
void |
configure(Properties properties)
Configure the actual client using the properties.
|
E |
getAvroClient() |
boolean |
isActive() |
String |
toString() |
protected int batchSize
protected long connectTimeout
protected long requestTimeout
protected ExecutorService callTimeoutPool
protected final ReentrantLock stateLock
protected URL targetUrl
protected org.cg.common.avro.EventIpcClient.ConnState connState
stateLockprotected InetSocketAddress address
protected boolean enableSsl
protected boolean trustAllCerts
protected String truststore
protected String truststorePassword
protected String truststoreType
protected boolean isHttp
protected org.apache.avro.ipc.Transceiver transceiver
protected E avroClient
protected static final org.slf4j.Logger logger
protected boolean enableDeflateCompression
protected int compressionLevel
public E getAvroClient()
public void close()
throws org.apache.flume.FlumeException
org.apache.flume.FlumeExceptionpublic void assertReady()
throws org.apache.flume.EventDeliveryException
EventDeliveryException.org.apache.flume.EventDeliveryExceptionpublic boolean isActive()
public void configure(Properties properties) throws org.apache.flume.FlumeException
Configure the actual client using the properties. properties should have at least 2 params:
hosts = alias_for_host
alias_for_host = hostname:port.
Only the first host is added, rest are discarded.Optionally it can also have a
batch-size = batchSize
properties - The properties to instantiate the client with.org.apache.flume.FlumeExceptionCopyright © 2016 CodeGerm. All rights reserved.