Class DefaultLastStateConnectionStateListener
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.DefaultLastStateConnectionStateListener
-
- All Implemented Interfaces:
LastStateConnectionStateListener,org.apache.flink.shaded.curator5.org.apache.curator.framework.state.ConnectionStateListener
public class DefaultLastStateConnectionStateListener extends Object implements LastStateConnectionStateListener
A simple ConnectionState listener that remembers the last state.
-
-
Constructor Summary
Constructors Constructor Description DefaultLastStateConnectionStateListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<org.apache.flink.shaded.curator5.org.apache.curator.framework.state.ConnectionState>getLastState()Return the last state the listener was notified about.voidstateChanged(org.apache.flink.shaded.curator5.org.apache.curator.framework.CuratorFramework client, org.apache.flink.shaded.curator5.org.apache.curator.framework.state.ConnectionState newState)
-
-
-
Method Detail
-
getLastState
public Optional<org.apache.flink.shaded.curator5.org.apache.curator.framework.state.ConnectionState> getLastState()
Description copied from interface:LastStateConnectionStateListenerReturn the last state the listener was notified about.- Specified by:
getLastStatein interfaceLastStateConnectionStateListener- Returns:
- the last state or none if the listener has not received an update
-
stateChanged
public void stateChanged(org.apache.flink.shaded.curator5.org.apache.curator.framework.CuratorFramework client, org.apache.flink.shaded.curator5.org.apache.curator.framework.state.ConnectionState newState)- Specified by:
stateChangedin interfaceorg.apache.flink.shaded.curator5.org.apache.curator.framework.state.ConnectionStateListener
-
-