Package io.aeron

Interface CounterProvider

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CounterProvider
Functional interface that abstracts creation of the counters.
  • Method Summary

    Modifier and Type
    Method
    Description
    newCounter(int typeId, DirectBuffer keyBuffer, int keyOffset, int keyLength, DirectBuffer labelBuffer, int labelOffset, int labelLength)
    Allocate a counter record and wrap it with a new AtomicCounter for use.
  • Method Details

    • newCounter

      AtomicCounter newCounter(int typeId, DirectBuffer keyBuffer, int keyOffset, int keyLength, DirectBuffer labelBuffer, int labelOffset, int labelLength)
      Allocate a counter record and wrap it with a new AtomicCounter for use.

      If the keyBuffer is null then a copy of the key is not attempted.

      Parameters:
      typeId - for the counter.
      keyBuffer - containing the optional key for the counter.
      keyOffset - within the keyBuffer at which the key begins.
      keyLength - of the key in the keyBuffer.
      labelBuffer - containing the mandatory label for the counter.
      labelOffset - within the labelBuffer at which the label begins.
      labelLength - of the label in the labelBuffer.
      Returns:
      the counter object.