Package com.microsoft.azure.eventhubs
Interface EventDataBatch
-
public interface EventDataBatchHelper for creating a batch/collection of EventData objects to be used while Sending to EventHubs
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetSize()Get the number of events present in thisEventDataBatchbooleantryAdd(EventData eventData)Add'sEventDatatoEventDataBatch, if permitted by the batch's size limit.
-
-
-
Method Detail
-
getSize
int getSize()
Get the number of events present in thisEventDataBatch- Returns:
- the EventDataBatch size
-
tryAdd
boolean tryAdd(EventData eventData) throws PayloadSizeExceededException
Add'sEventDatatoEventDataBatch, if permitted by the batch's size limit. This method is not thread-safe.- Parameters:
eventData- TheEventDatato add.- Returns:
- A boolean value indicating if the
EventDataaddition to this batch/collection was successful or not. - Throws:
PayloadSizeExceededException- when a singleEventDatainstance exceeds maximum allowed size of the batch
-
-