public class EventhubDataWriter extends Object implements SyncDataWriter<String>, BatchAsyncDataWriter<String>
| Constructor and Description |
|---|
EventhubDataWriter(Properties properties)
User needs to provide eventhub properties
|
EventhubDataWriter(Properties properties,
org.apache.http.client.HttpClient httpclient)
User needs to provide eventhub properties and an httpClient
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
void |
close()
Close the HttpClient
|
void |
flush() |
void |
refreshSignature()
A signature which contains the duration.
|
Future<WriteResponse> |
write(Batch<String> batch,
WriteCallback callback)
Write a whole batch to eventhub
|
WriteResponse |
write(String record)
Write a single record to eventhub
|
public EventhubDataWriter(Properties properties)
public EventhubDataWriter(Properties properties, org.apache.http.client.HttpClient httpclient)
public Future<WriteResponse> write(Batch<String> batch, WriteCallback callback)
write in interface BatchAsyncDataWriter<String>public WriteResponse write(String record) throws IOException
write in interface SyncDataWriter<String>IOExceptionpublic void refreshSignature()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void cleanup()
cleanup in interface SyncDataWriter<String>public void flush()
flush in interface BatchAsyncDataWriter<String>