public class AtomixLeaderElectorState
extends io.atomix.resource.ResourceStateMachine
implements io.atomix.copycat.server.session.SessionListener, io.atomix.copycat.server.Snapshottable
AtomixLeaderElector resource.| Constructor and Description |
|---|
AtomixLeaderElectorState(Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Leadership> |
allLeaderships(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.GetAllLeaderships> commit)
Applies an
AtomixLeaderElectorCommands.GetAllLeaderships commit. |
boolean |
anoint(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Anoint> commit)
Applies an
AtomixLeaderElectorCommands.Anoint commit. |
void |
close(io.atomix.copycat.server.session.ServerSession session) |
protected void |
configure(io.atomix.copycat.server.StateMachineExecutor executor) |
void |
delete() |
Set<String> |
electedTopics(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.GetElectedTopics> commit)
Applies an
AtomixLeaderElectorCommands.GetElectedTopics commit. |
void |
evict(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Evict> commit)
Applies an
AtomixLeaderElectorCommands.Evict commit. |
void |
expire(io.atomix.copycat.server.session.ServerSession session) |
void |
install(io.atomix.copycat.server.storage.snapshot.SnapshotReader reader) |
Leadership |
leadership(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.GetLeadership> commit)
Applies an
AtomixLeaderElectorCommands.GetLeadership commit. |
void |
listen(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Listen> commit)
Applies listen commits.
|
boolean |
promote(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Promote> commit)
Applies an
AtomixLeaderElectorCommands.Promote commit. |
void |
register(io.atomix.copycat.server.session.ServerSession session) |
Leadership |
run(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Run> commit)
Applies an
AtomixLeaderElectorCommands.Run commit. |
void |
snapshot(io.atomix.copycat.server.storage.snapshot.SnapshotWriter writer) |
void |
unlisten(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Unlisten> commit)
Applies unlisten commits.
|
void |
unregister(io.atomix.copycat.server.session.ServerSession session) |
void |
withdraw(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Withdraw> commit)
Applies an
AtomixLeaderElectorCommands.Withdraw commit. |
public AtomixLeaderElectorState(Properties properties)
protected void configure(io.atomix.copycat.server.StateMachineExecutor executor)
configure in class io.atomix.copycat.server.StateMachinepublic void delete()
delete in class io.atomix.resource.ResourceStateMachinepublic void listen(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Listen> commit)
commit - listen commitpublic void unlisten(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Unlisten> commit)
commit - unlisten commitpublic Leadership run(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Run> commit)
AtomixLeaderElectorCommands.Run commit.commit - commit entrypublic void withdraw(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Withdraw> commit)
AtomixLeaderElectorCommands.Withdraw commit.commit - withdraw commitpublic boolean anoint(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Anoint> commit)
AtomixLeaderElectorCommands.Anoint commit.commit - anoint committrue if changes were made and the transfer occurred; false if it did not.public boolean promote(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Promote> commit)
AtomixLeaderElectorCommands.Promote commit.commit - promote committrue if changes desired end state is achieved.public void evict(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.Evict> commit)
AtomixLeaderElectorCommands.Evict commit.commit - evict commitpublic Leadership leadership(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.GetLeadership> commit)
AtomixLeaderElectorCommands.GetLeadership commit.commit - GetLeadership commitpublic Set<String> electedTopics(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.GetElectedTopics> commit)
AtomixLeaderElectorCommands.GetElectedTopics commit.commit - commit entrypublic Map<String,Leadership> allLeaderships(io.atomix.copycat.server.Commit<? extends AtomixLeaderElectorCommands.GetAllLeaderships> commit)
AtomixLeaderElectorCommands.GetAllLeaderships commit.commit - GetAllLeaderships commitpublic void register(io.atomix.copycat.server.session.ServerSession session)
register in interface io.atomix.copycat.server.session.SessionListenerregister in class io.atomix.resource.ResourceStateMachinepublic void unregister(io.atomix.copycat.server.session.ServerSession session)
unregister in interface io.atomix.copycat.server.session.SessionListenerunregister in class io.atomix.resource.ResourceStateMachinepublic void expire(io.atomix.copycat.server.session.ServerSession session)
expire in interface io.atomix.copycat.server.session.SessionListenerexpire in class io.atomix.resource.ResourceStateMachinepublic void close(io.atomix.copycat.server.session.ServerSession session)
close in interface io.atomix.copycat.server.session.SessionListenerclose in class io.atomix.resource.ResourceStateMachinepublic void snapshot(io.atomix.copycat.server.storage.snapshot.SnapshotWriter writer)
snapshot in interface io.atomix.copycat.server.Snapshottablepublic void install(io.atomix.copycat.server.storage.snapshot.SnapshotReader reader)
install in interface io.atomix.copycat.server.Snapshottable