org.apache.storm.eventhubs.trident

## Class TridentPartitionManager

- java.lang.Object
- - org.apache.storm.eventhubs.trident.TridentPartitionManager

- All Implemented Interfaces:
    ITridentPartitionManager

      public class TridentPartitionManager
      extends Object
      implements ITridentPartitionManager

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TridentPartitionManager(EventHubSpoutConfig spoutConfig, IEventHubReceiver receiver)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `boolean` | `open(String offset)`
    `List<EventDataWrap>` | `receiveBatch(String offset, int count)` receive a batch of messages from EvenHub up to “count” messages.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TridentPartitionManager

          public TridentPartitionManager(EventHubSpoutConfig spoutConfig,
                                         IEventHubReceiver receiver)

  - ### Method Detail

    - #### open

          public boolean open(String offset)

      Specified by:
        `open` in interface `ITridentPartitionManager`

    - #### close

          public void close()

      Specified by:
        `close` in interface `ITridentPartitionManager`

    - #### receiveBatch

          public List<EventDataWrap> receiveBatch(String offset,
                                                  int count)

      Description copied from interface: `ITridentPartitionManager`

      receive a batch of messages from EvenHub up to “count” messages.

      Specified by:
        `receiveBatch` in interface `ITridentPartitionManager`
      Parameters:
        `offset` - the starting offset
        `count` - max number of messages in this batch
      Returns:
        list of EventData, if failed to receive, return empty list

Copyright © 2021 The Apache Software Foundation. All rights reserved.