Enum Class DevNullMetricsListener

java.lang.Object
java.lang.Enum<DevNullMetricsListener>
org.neo4j.driver.internal.metrics.DevNullMetricsListener
All Implemented Interfaces:
Serializable, Comparable<DevNullMetricsListener>, Constable, MetricsListener

public enum DevNullMetricsListener extends Enum<DevNullMetricsListener> implements MetricsListener
  • Enum Constant Details

  • Method Details

    • values

      public static DevNullMetricsListener[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DevNullMetricsListener valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • beforeCreating

      public void beforeCreating(String poolId, ListenerEvent<?> creatingEvent)
      Description copied from interface: MetricsListener
      Before creating a netty channel.
      Specified by:
      beforeCreating in interface MetricsListener
      Parameters:
      poolId - the id of the pool where the netty channel lives.
      creatingEvent - a connection listener event registered when a connection is creating.
    • afterCreated

      public void afterCreated(String poolId, ListenerEvent<?> creatingEvent)
      Description copied from interface: MetricsListener
      After a netty channel is created successfully.
      Specified by:
      afterCreated in interface MetricsListener
      Parameters:
      poolId - the id of the pool where the netty channel lives.
    • afterFailedToCreate

      public void afterFailedToCreate(String poolId)
      Description copied from interface: MetricsListener
      After a netty channel is created with a failure.
      Specified by:
      afterFailedToCreate in interface MetricsListener
      Parameters:
      poolId - the id of the pool where the netty channel lives.
    • afterClosed

      public void afterClosed(String poolId)
      Description copied from interface: MetricsListener
      After a netty channel is closed successfully.
      Specified by:
      afterClosed in interface MetricsListener
      Parameters:
      poolId - the id of the pool where the netty channel lives.
    • beforeAcquiringOrCreating

      public void beforeAcquiringOrCreating(String poolId, ListenerEvent<?> acquireEvent)
      Description copied from interface: MetricsListener
      Before acquiring or creating a new netty channel from pool.
      Specified by:
      beforeAcquiringOrCreating in interface MetricsListener
      Parameters:
      poolId - the id of the pool where the netty channel lives.
      acquireEvent - a pool listener event registered in pool for this acquire event.
    • afterAcquiringOrCreating

      public void afterAcquiringOrCreating(String poolId)
      Description copied from interface: MetricsListener
      After acquiring or creating a new netty channel from pool regardless it is successful or not.
      Specified by:
      afterAcquiringOrCreating in interface MetricsListener
      Parameters:
      poolId - the id of the pool where the netty channel lives.
    • afterAcquiredOrCreated

      public void afterAcquiredOrCreated(String poolId, ListenerEvent<?> acquireEvent)
      Description copied from interface: MetricsListener
      After acquiring or creating a new netty channel from pool successfully.
      Specified by:
      afterAcquiredOrCreated in interface MetricsListener
      Parameters:
      poolId - the id of the pool where the netty channel lives.
      acquireEvent - a pool listener event registered in pool for this acquire event.
    • afterTimedOutToAcquireOrCreate

      public void afterTimedOutToAcquireOrCreate(String poolId)
      Description copied from interface: MetricsListener
      After we failed to acquire a connection from pool within maximum connection acquisition timeout set by Config.ConfigBuilder.withConnectionAcquisitionTimeout(long, TimeUnit).
      Specified by:
      afterTimedOutToAcquireOrCreate in interface MetricsListener
      Parameters:
      poolId - the id of the pool where the netty channel lives.
    • afterConnectionCreated

      public void afterConnectionCreated(String poolId, ListenerEvent<?> inUseEvent)
      Description copied from interface: MetricsListener
      After acquiring or creating a new netty channel from pool successfully.
      Specified by:
      afterConnectionCreated in interface MetricsListener
      Parameters:
      poolId - the id of the pool where the netty channel lives.
      inUseEvent - a connection listener event fired from the newly created connection.
    • afterConnectionReleased

      public void afterConnectionReleased(String poolId, ListenerEvent<?> inUseEvent)
      Description copied from interface: MetricsListener
      After releasing a netty channel back to pool successfully.
      Specified by:
      afterConnectionReleased in interface MetricsListener
      Parameters:
      poolId - the id of the pool where the netty channel lives.
      inUseEvent - a connection listener event fired from the connection being released.
    • createListenerEvent

      public ListenerEvent<?> createListenerEvent()
      Specified by:
      createListenerEvent in interface MetricsListener
    • registerPoolMetrics

      public void registerPoolMetrics(String poolId, ServerAddress serverAddress, IntSupplier inUseSupplier, IntSupplier idleSupplier)
      Specified by:
      registerPoolMetrics in interface MetricsListener
    • removePoolMetrics

      public void removePoolMetrics(String poolId)
      Specified by:
      removePoolMetrics in interface MetricsListener
    • toString

      public String toString()
      Overrides:
      toString in class Enum<DevNullMetricsListener>