Class HeartbeatServicesImpl
- java.lang.Object
-
- org.apache.flink.runtime.heartbeat.HeartbeatServicesImpl
-
- All Implemented Interfaces:
HeartbeatServices
public final class HeartbeatServicesImpl extends Object implements HeartbeatServices
A defaultHeartbeatServices
implementation.
-
-
Constructor Summary
Constructors Constructor Description HeartbeatServicesImpl(long heartbeatInterval, long heartbeatTimeout)
HeartbeatServicesImpl(long heartbeatInterval, long heartbeatTimeout, int failedRpcRequestsUntilUnreachable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <I,O>
HeartbeatManager<I,O>createHeartbeatManager(ResourceID resourceId, HeartbeatListener<I,O> heartbeatListener, 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, ScheduledExecutor mainThreadExecutor, org.slf4j.Logger log)
Creates a heartbeat manager which actively sends heartbeats to monitoring targets.
-
-
-
Method Detail
-
createHeartbeatManager
public <I,O> HeartbeatManager<I,O> createHeartbeatManager(ResourceID resourceId, HeartbeatListener<I,O> heartbeatListener, ScheduledExecutor mainThreadExecutor, org.slf4j.Logger log)
Description copied from interface:HeartbeatServices
Creates a heartbeat manager which does not actively send heartbeats.- Specified by:
createHeartbeatManager
in interfaceHeartbeatServices
- 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
public <I,O> HeartbeatManager<I,O> createHeartbeatManagerSender(ResourceID resourceId, HeartbeatListener<I,O> heartbeatListener, ScheduledExecutor mainThreadExecutor, org.slf4j.Logger log)
Description copied from interface:HeartbeatServices
Creates a heartbeat manager which actively sends heartbeats to monitoring targets.- Specified by:
createHeartbeatManagerSender
in interfaceHeartbeatServices
- 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
-
-