java.lang.Object
com.aoindustries.aoserv.cluster.Cluster
- All Implemented Interfaces:
Serializable
,Comparable<Cluster>
A cluster contains all of the definitions for virtual and physical resources
required and available, but nothing about the current mapping between them.
ClusterConfiguration keeps track of the current mappings.
A cluster is immutable. All setters return a new instance of a cluster.
- Author:
- AO Industries, Inc.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddDom0
(String hostname, int ram, ProcessorType processorType, ProcessorArchitecture processorArchitecture, int processorSpeed, int processorCores, boolean supportsHvm) Adds a Dom0 to the cluster returning the reference to the new cluster object.addDom0Disk
(String hostname, String device, int diskSpeed) Adds a disk to the server with the provided hostname, returns the new cluster.addDomU
(String hostname, int primaryRam, int secondaryRam, ProcessorType minimumProcessorType, ProcessorArchitecture minimumProcessorArchitecture, int minimumProcessorSpeed, short processorCores, short processorWeight, boolean requiresHvm, boolean primaryDom0Locked, boolean secondaryDom0Locked) Adds a DomU to the cluster returning the reference to new cluster.addDomUDisk
(String hostname, String device, int minimumDiskSpeed, int extents, short weight) Adds a disk to this virtual server, returns the new cluster.addPhysicalVolume
(String hostname, String device, short partition, long extents) Adds a physical volume to this disk, returns the new cluster.int
Sorted ascending.Gets a specific Dom0 by name ornull
if not found.getDom0s()
Gets an unmodifiable set of Dom0s.Gets a specific DomU by name ornull
if not found.getDomUs()
Gets an unmodifiable set of DomUs.getName()
toString()
-
Constructor Details
-
Cluster
Creates a new, empty cluster.
-
-
Method Details
-
getName
-
compareTo
Sorted ascending. By:- name
- Specified by:
compareTo
in interfaceComparable<Cluster>
-
toString
-
getDom0s
Gets an unmodifiable set of Dom0s. -
getDom0
Gets a specific Dom0 by name ornull
if not found. -
addDom0
public Cluster addDom0(String hostname, int ram, ProcessorType processorType, ProcessorArchitecture processorArchitecture, int processorSpeed, int processorCores, boolean supportsHvm) Adds a Dom0 to the cluster returning the reference to the new cluster object. -
getDomUs
Gets an unmodifiable set of DomUs. -
getDomU
Gets a specific DomU by name ornull
if not found. -
addDomU
public Cluster addDomU(String hostname, int primaryRam, int secondaryRam, ProcessorType minimumProcessorType, ProcessorArchitecture minimumProcessorArchitecture, int minimumProcessorSpeed, short processorCores, short processorWeight, boolean requiresHvm, boolean primaryDom0Locked, boolean secondaryDom0Locked) Adds a DomU to the cluster returning the reference to new cluster. -
addDom0Disk
Adds a disk to the server with the provided hostname, returns the new cluster. -
addPhysicalVolume
Adds a physical volume to this disk, returns the new cluster. -
addDomUDisk
public Cluster addDomUDisk(String hostname, String device, int minimumDiskSpeed, int extents, short weight) Adds a disk to this virtual server, returns the new cluster.
-