public interface ClusterAdvisor
ClusterAdvisor
provides methods to decide the status of Corfu servers
(failed or healed) in a given Layout
and for a specific view of the cluster
captured in a ClusterState
. Decisions are dependant on the concrete underlying algorithm
corresponding to a ClusterType
.
Created by Sam Behnam on 10/19/18.Modifier and Type | Method and Description |
---|---|
Optional<NodeRank> |
failedServer(ClusterState clusterState,
List<String> unresponsiveServers)
Provide a list of servers in the Corfu cluster which according to the underlying algorithm
for
ClusterType have failed. |
ClusterGraph |
getGraph(ClusterState clusterState)
Provides a cluster graph generated from the
ClusterState |
ClusterType |
getType()
Get the corresponding
ClusterType used in the current instance of
ClusterAdvisor . |
Optional<NodeRank> |
healedServer(ClusterState clusterState,
List<String> unresponsiveServers)
Provide a server in the Corfu cluster which according to the underlying algorithm
for
ClusterType have healed. |
ClusterType getType()
ClusterType
used in the current instance of
ClusterAdvisor
. This strategy represents the characteristics of the
underlying algorithm used for making a decision about the failed or healed status of
Corfu servers.ClusterType
Optional<NodeRank> failedServer(ClusterState clusterState, List<String> unresponsiveServers)
ClusterType
have failed. The decision is made based on the
given view of the cluster captured in ClusterState
along with the expected
Layout
.clusterState
- view of the Corfu server cluster from a client node's perspective.unresponsiveServers
- unresponsive servers in a layout.ClusterType
.Optional<NodeRank> healedServer(ClusterState clusterState, List<String> unresponsiveServers)
ClusterType
have healed. The decision is made based on the
given view of the cluster captured in ClusterState
along with the expected
Layout
.clusterState
- view of the Corfu server cluster from a client node's perspective.unresponsiveServers
- unresponsive servers in a layout.ClusterType
.ClusterGraph getGraph(ClusterState clusterState)
ClusterState
Copyright © 2019 CorfuDB. All rights reserved.