- All Known Implementing Classes:
DevNullMetricsListener
public interface MetricsListener
-
Method Summary
Modifier and TypeMethodDescriptionvoidafterAcquiredOrCreated(String poolId, ListenerEvent<?> acquireEvent) After acquiring or creating a new netty channel from pool successfully.voidafterAcquiringOrCreating(String poolId) After acquiring or creating a new netty channel from pool regardless it is successful or not.voidafterClosed(String poolId) After a netty channel is closed successfully.voidafterConnectionCreated(String poolId, ListenerEvent<?> inUseEvent) After acquiring or creating a new netty channel from pool successfully.voidafterConnectionReleased(String poolId, ListenerEvent<?> inUseEvent) After releasing a netty channel back to pool successfully.voidafterCreated(String poolId, ListenerEvent<?> creatingEvent) After a netty channel is created successfully.voidafterFailedToCreate(String poolId) After a netty channel is created with a failure.voidafterTimedOutToAcquireOrCreate(String poolId) After we failed to acquire a connection from pool within maximum connection acquisition timeout set byConfig.ConfigBuilder.withConnectionAcquisitionTimeout(long, TimeUnit).voidbeforeAcquiringOrCreating(String poolId, ListenerEvent<?> acquireEvent) Before acquiring or creating a new netty channel from pool.voidbeforeCreating(String poolId, ListenerEvent<?> creatingEvent) Before creating a netty channel.voidregisterPoolMetrics(String poolId, BoltServerAddress serverAddress, IntSupplier inUseSupplier, IntSupplier idleSupplier) voidremovePoolMetrics(String poolId)
-
Method Details
-
beforeCreating
Before creating a netty channel.- Parameters:
poolId- the id of the pool where the netty channel lives.creatingEvent- a connection listener event registered when a connection is creating.
-
afterCreated
After a netty channel is created successfully.- Parameters:
poolId- the id of the pool where the netty channel lives.
-
afterFailedToCreate
After a netty channel is created with a failure.- Parameters:
poolId- the id of the pool where the netty channel lives.
-
afterClosed
After a netty channel is closed successfully.- Parameters:
poolId- the id of the pool where the netty channel lives.
-
beforeAcquiringOrCreating
Before acquiring or creating a new netty channel from pool.- 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
After acquiring or creating a new netty channel from pool regardless it is successful or not.- Parameters:
poolId- the id of the pool where the netty channel lives.
-
afterAcquiredOrCreated
After acquiring or creating a new netty channel from pool successfully.- 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
After we failed to acquire a connection from pool within maximum connection acquisition timeout set byConfig.ConfigBuilder.withConnectionAcquisitionTimeout(long, TimeUnit).- Parameters:
poolId- the id of the pool where the netty channel lives.
-
afterConnectionCreated
After acquiring or creating a new netty channel from pool successfully.- Parameters:
poolId- the id of the pool where the netty channel lives.inUseEvent- a connection listener event fired from the newly created connection.
-
afterConnectionReleased
After releasing a netty channel back to pool successfully.- Parameters:
poolId- the id of the pool where the netty channel lives.inUseEvent- a connection listener event fired from the connection being released.
-
createListenerEvent
ListenerEvent<?> createListenerEvent() -
registerPoolMetrics
void registerPoolMetrics(String poolId, BoltServerAddress serverAddress, IntSupplier inUseSupplier, IntSupplier idleSupplier) -
removePoolMetrics
-