Class TemplateKey

java.lang.Object
org.graylog.plugins.netflow.codecs.TemplateKey

public class TemplateKey extends Object
The unique key for template flow ids, which is exporter source address and its obversation id (source ID)
  • Constructor Details

    • TemplateKey

      public TemplateKey(SocketAddress remoteAddress, long sourceId, int templateId)
  • Method Details

    • idForExporter

      public static TemplateKey idForExporter(SocketAddress remoteAddress, long sourceId)
      A key usable for identifying netflow exporters, when the template id is irrelevant. This is used for grouping buffered packets by their exporter, because template ids are only unique across remote address and source id.
      Parameters:
      remoteAddress - the exporters address
      sourceId - the observation id
      Returns:
      object for use as cache key
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getRemoteAddress

      public SocketAddress getRemoteAddress()
    • getSourceId

      public long getSourceId()
    • getTemplateId

      public int getTemplateId()
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object