java.lang.Object
org.apache.flink.streaming.examples.statemachine.event.Event

public class Event extends Object
Data type for events, consisting of the originating IP address and an event type.
  • Constructor Details

    • Event

      public Event(EventType type, int sourceAddress)
      Creates a new event.
      Parameters:
      type - The event type.
      sourceAddress - The originating address (think 32 bit IPv4 address).
  • Method Details

    • type

      public EventType type()
      Gets the event's type.
    • sourceAddress

      public int sourceAddress()
      Gets the event's source address.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • formatAddress

      public static String formatAddress(int address)
      Util method to create a string representation of a 32 bit integer representing an IPv4 address.
      Parameters:
      address - The address, MSB first.
      Returns:
      The IP address string.