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 -
Method Summary
Modifier and TypeMethodDescriptionOptional<org.apache.flink.shaded.curator5.org.apache.curator.framework.state.ConnectionState>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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.shaded.curator5.org.apache.curator.framework.state.ConnectionStateListener
doNotProxy
-
Constructor Details
-
DefaultLastStateConnectionStateListener
public DefaultLastStateConnectionStateListener()
-
-
Method Details
-
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
-