Class AoservClusterBuilder
java.lang.Object
com.aoindustries.noc.monitor.cluster.AoservClusterBuilder
Builds the cluster configuration from the AOServ Platform.
TODO: Add check to make sure that virtual server to physical server mappings are always within the same cluster? - or - Could this be an underlying database constraint?
- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Cluster
getCluster
(AoservConnector conn, ServerFarm serverFarm, List<Server> linuxServers, Map<String, Map<String, String>> hddModelReports, Map<String, Server.LvmReport> lvmReports, boolean useTarget) Loads a cluster for a single server farm.static ClusterConfiguration
getClusterConfiguration
(Locale locale, AoservConnector conn, Cluster cluster, Map<String, List<Server.DrbdReport>> drbdReports, Map<String, Server.LvmReport> lvmReports) Loads the configuration for the provided cluster.static SortedSet
<ClusterConfiguration> getClusterConfigurations
(Locale locale, AoservConnector conn, SortedSet<Cluster> clusters, Map<String, List<Server.DrbdReport>> drbdReports, Map<String, Server.LvmReport> lvmReports) Loads an unmodifiable set of the current cluster configuration from the AOServ Platform.getClusters
(AoservConnector conn, List<Server> linuxServers, Map<String, Map<String, String>> hddModelReports, Map<String, Server.LvmReport> lvmReports, boolean useTarget) Loads an unmodifiable set of the current cluster states from the AOServ Platform.static Map
<String, List<Server.DrbdReport>> getDrbdReports
(List<Server> linuxServers, Locale locale) Concurrently gets all of the DRBD reports for the entire cluster.getHddModelReports
(List<Server> linuxServers, Locale locale) Concurrently gets all of the hard drive model reports for the all clusters.static Map
<String, Server.LvmReport> getLvmReports
(List<Server> linuxServers, Locale locale) Concurrently gets all of the LVM reports for the all clusters.
-
Method Details
-
getClusters
public static SortedSet<Cluster> getClusters(AoservConnector conn, List<Server> linuxServers, Map<String, Map<String, throws SQLException, InterruptedException, ExecutionException, IOExceptionString>> hddModelReports, Map<String, Server.LvmReport> lvmReports, boolean useTarget) Loads an unmodifiable set of the current cluster states from the AOServ Platform. Only ServerFarms that have at least one enabled Dom0 are included.- Throws:
SQLException
InterruptedException
ExecutionException
IOException
- See Also:
-
getCluster
public static Cluster getCluster(AoservConnector conn, ServerFarm serverFarm, List<Server> linuxServers, Map<String, Map<String, throws SQLException, IOExceptionString>> hddModelReports, Map<String, Server.LvmReport> lvmReports, boolean useTarget) Loads a cluster for a single server farm.- Parameters:
useTarget
- if true will use the target values, otherwise will use the live values- Throws:
SQLException
IOException
-
getClusterConfigurations
public static SortedSet<ClusterConfiguration> getClusterConfigurations(Locale locale, AoservConnector conn, SortedSet<Cluster> clusters, Map<String, List<Server.DrbdReport>> drbdReports, Map<String, throws InterruptedException, ExecutionExceptionServer.LvmReport> lvmReports) Loads an unmodifiable set of the current cluster configuration from the AOServ Platform.- Throws:
InterruptedException
ExecutionException
- See Also:
-
getDrbdReports
public static Map<String,List<Server.DrbdReport>> getDrbdReports(List<Server> linuxServers, Locale locale) throws SQLException, InterruptedException, ExecutionException, IOException Concurrently gets all of the DRBD reports for the entire cluster. This doesn't perform any sanity checks on the data, it merely parses it and ensures correct values. -
getLvmReports
public static Map<String,Server.LvmReport> getLvmReports(List<Server> linuxServers, Locale locale) throws SQLException, InterruptedException, ExecutionException, IOException Concurrently gets all of the LVM reports for the all clusters. This doesn't perform any sanity checks on the data, it merely parses it and ensures correct values. -
getHddModelReports
public static Map<String,Map<String, getHddModelReportsString>> (List<Server> linuxServers, Locale locale) throws SQLException, InterruptedException, ExecutionException, IOException Concurrently gets all of the hard drive model reports for the all clusters. This doesn't perform any sanity checks on the data, it merely parses it and ensures correct values. -
getClusterConfiguration
public static ClusterConfiguration getClusterConfiguration(Locale locale, AoservConnector conn, Cluster cluster, Map<String, List<Server.DrbdReport>> drbdReports, Map<String, throws ParseException, IOException, SQLExceptionServer.LvmReport> lvmReports) Loads the configuration for the provided cluster.- Throws:
ParseException
IOException
SQLException
-