Interface HeartbeatServices
-
- All Known Implementing Classes:
HeartbeatServicesImpl
,NoOpHeartbeatServices
public interface HeartbeatServices
HeartbeatServices gives access to all services needed for heartbeating. This includes the creation of heartbeat receivers and heartbeat senders.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <I,O>
HeartbeatManager<I,O>createHeartbeatManager(ResourceID resourceId, HeartbeatListener<I,O> heartbeatListener, org.apache.flink.util.concurrent.ScheduledExecutor mainThreadExecutor, org.slf4j.Logger log)
Creates a heartbeat manager which does not actively send heartbeats.<I,O>
HeartbeatManager<I,O>createHeartbeatManagerSender(ResourceID resourceId, HeartbeatListener<I,O> heartbeatListener, org.apache.flink.util.concurrent.ScheduledExecutor mainThreadExecutor, org.slf4j.Logger log)
Creates a heartbeat manager which actively sends heartbeats to monitoring targets.static HeartbeatServices
fromConfiguration(org.apache.flink.configuration.Configuration configuration)
Creates an HeartbeatServices instance from aConfiguration
.static HeartbeatServices
noOp()
-
-
-
Method Detail
-
createHeartbeatManager
<I,O> HeartbeatManager<I,O> createHeartbeatManager(ResourceID resourceId, HeartbeatListener<I,O> heartbeatListener, org.apache.flink.util.concurrent.ScheduledExecutor mainThreadExecutor, org.slf4j.Logger log)
Creates a heartbeat manager which does not actively send heartbeats.- Type Parameters:
I
- Type of the incoming payloadO
- Type of the outgoing payload- Parameters:
resourceId
- Resource Id which identifies the owner of the heartbeat managerheartbeatListener
- Listener which will be notified upon heartbeat timeouts for registered targetsmainThreadExecutor
- Scheduled executor to be used for scheduling heartbeat timeoutslog
- Logger to be used for the logging- Returns:
- A new HeartbeatManager instance
-
createHeartbeatManagerSender
<I,O> HeartbeatManager<I,O> createHeartbeatManagerSender(ResourceID resourceId, HeartbeatListener<I,O> heartbeatListener, org.apache.flink.util.concurrent.ScheduledExecutor mainThreadExecutor, org.slf4j.Logger log)
Creates a heartbeat manager which actively sends heartbeats to monitoring targets.- Type Parameters:
I
- Type of the incoming payloadO
- Type of the outgoing payload- Parameters:
resourceId
- Resource Id which identifies the owner of the heartbeat managerheartbeatListener
- Listener which will be notified upon heartbeat timeouts for registered targetsmainThreadExecutor
- Scheduled executor to be used for scheduling heartbeat timeouts and periodically send heartbeat requestslog
- Logger to be used for the logging- Returns:
- A new HeartbeatManager instance which actively sends heartbeats
-
fromConfiguration
static HeartbeatServices fromConfiguration(org.apache.flink.configuration.Configuration configuration)
Creates an HeartbeatServices instance from aConfiguration
.- Parameters:
configuration
- Configuration to be used for the HeartbeatServices creation- Returns:
- An HeartbeatServices instance created from the given configuration
-
noOp
static HeartbeatServices noOp()
-
-