org.apache.storm.eventhubs.spout

## Class SimplePartitionManager

- java.lang.Object
- - org.apache.storm.eventhubs.spout.SimplePartitionManager

- All Implemented Interfaces:
    IPartitionManager
  Direct Known Subclasses:
    PartitionManager

      public class SimplePartitionManager
      extends Object
      implements IPartitionManager

  A simple partition manager that does not re-send failed messages.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `committedOffset`
    `protected EventHubSpoutConfig` | `config`
    `protected String` | `lastOffset`
    `protected IEventHubReceiver` | `receiver`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimplePartitionManager(EventHubSpoutConfig spoutConfig, String partitionId, IStateStore stateStore, IEventHubReceiver receiver)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `ack(String offset)`
    `void` | `checkpoint()`
    `void` | `close()`
    `void` | `fail(String offset)`
    `protected String` | `getCompletedOffset()`
    `Map<String,Object>` | `getMetricsData()`
    `void` | `open()`
    `EventDataWrap` | `receive()`

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

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

- - ### Field Detail

    - #### receiver

          protected final IEventHubReceiver receiver

    - #### config

          protected final EventHubSpoutConfig config

    - #### lastOffset

          protected String lastOffset

    - #### committedOffset

          protected String committedOffset

  - ### Constructor Detail

    - #### SimplePartitionManager

          public SimplePartitionManager(EventHubSpoutConfig spoutConfig,
                                        String partitionId,
                                        IStateStore stateStore,
                                        IEventHubReceiver receiver)

  - ### Method Detail

    - #### open

          public void open()
                    throws Exception

      Specified by:
        `open` in interface `IPartitionManager`
      Throws:
        `Exception`

    - #### close

          public void close()

      Specified by:
        `close` in interface `IPartitionManager`

    - #### checkpoint

          public void checkpoint()

      Specified by:
        `checkpoint` in interface `IPartitionManager`

    - #### getCompletedOffset

          protected String getCompletedOffset()

    - #### receive

          public EventDataWrap receive()

      Specified by:
        `receive` in interface `IPartitionManager`

    - #### ack

          public void ack(String offset)

      Specified by:
        `ack` in interface `IPartitionManager`

    - #### fail

          public void fail(String offset)

      Specified by:
        `fail` in interface `IPartitionManager`

    - #### getMetricsData

          public Map<String,Object> getMetricsData()

      Specified by:
        `getMetricsData` in interface `IPartitionManager`

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