Package com.microsoft.azure.eventhubs
Interface EventDataBatch
-
public interface EventDataBatch
Helper 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 int
getSize()
Get the number of events present in thisEventDataBatch
boolean
tryAdd(EventData eventData)
Add'sEventData
toEventDataBatch
, 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'sEventData
toEventDataBatch
, if permitted by the batch's size limit. This method is not thread-safe.- Parameters:
eventData
- TheEventData
to add.- Returns:
- A boolean value indicating if the
EventData
addition to this batch/collection was successful or not. - Throws:
PayloadSizeExceededException
- when a singleEventData
instance exceeds maximum allowed size of the batch
-
-