Skip to content

Instantly share code, notes, and snippets.

@arjunsk
Created May 12, 2022 15:59
Show Gist options
  • Save arjunsk/89167f779ca0b2f01cd0d817c6288598 to your computer and use it in GitHub Desktop.
Save arjunsk/89167f779ca0b2f01cd0d817c6288598 to your computer and use it in GitHub Desktop.
/**
* Add a listener for the state change of the leader with
* this region.
* <p>
* In a special case, if that is a single region environment,
* then regionId = -1 as the input parameter.
*/
void addLeaderStateListener(final long regionId, final LeaderStateListener listener);
/**
* Add a listener for the state change of the follower with
* this region.
* <p>
* In a special case, if that is a single region environment,
* then regionId = -1 as the input parameter.
*/
void addFollowerStateListener(final long regionId, final FollowerStateListener listener);
/**
* Add a listener for the state change (leader, follower) with
* this region.
* <p>
* In a special case, if that is a single region environment,
* then regionId = -1 as the input parameter.
*/
void addStateListener(final long regionId, final StateListener listener);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment