Package com.aoindustries.aoserv.cluster
Class PhysicalVolumeConfiguration
java.lang.Object
com.aoindustries.aoserv.cluster.PhysicalVolumeConfiguration
- All Implemented Interfaces:
Serializable,Comparable<PhysicalVolumeConfiguration>
- Direct Known Subclasses:
PhysicalVolumeConfigurationInt,PhysicalVolumeConfigurationLong,PhysicalVolumeConfigurationShort
public abstract class PhysicalVolumeConfiguration
extends Object
implements Comparable<PhysicalVolumeConfiguration>, Serializable
One Xen domU disk to physical volume configuration. This equates to a LVM logical volume to physical volume mapping segment.
See lvdisplay -m for segments.
- Author:
- AO Industries, Inc.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal intSorted ascending.final booleanPerforms a deep field-by-field comparison to see if two configurations are identical in every way.final booleanPerforms a deep field-by-field comparison to see if two configurations are identical in every way.abstract longGets the number of extents.abstract longGets the first logical extent.abstract longGets the first physical extent.final PhysicalVolumefinal inthashCode()static PhysicalVolumeConfigurationnewInstance(PhysicalVolume physicalVolume, long firstLogicalExtent, long firstPhysicalExtent, long extents) Creates a new PhysicalVolume of the appropriate type for the provided extents.final booleanReturns true if either the logical or the physical extents overlap.final StringtoString()
-
Method Details
-
newInstance
public static PhysicalVolumeConfiguration newInstance(PhysicalVolume physicalVolume, long firstLogicalExtent, long firstPhysicalExtent, long extents) Creates a new PhysicalVolume of the appropriate type for the provided extents. Will use 16-bit and 32-bit representation when possible to save heap.If heap space is every an issue, can use even more specialized versions like: PhysicalVolumeConfiguration896 for multiples of 896 that can store into byte PhysicalVolumeConfiguration_0_0_896 for newInstance(0,0,896) - would need to measure to know which would save heap
-
toString
-
getPhysicalVolume
-
equals
Performs a deep field-by-field comparison to see if two configurations are identical in every way. -
equals
Performs a deep field-by-field comparison to see if two configurations are identical in every way.- See Also:
-
hashCode
public final int hashCode() -
getFirstLogicalExtent
public abstract long getFirstLogicalExtent()Gets the first logical extent. -
getFirstPhysicalExtent
public abstract long getFirstPhysicalExtent()Gets the first physical extent. -
getExtents
public abstract long getExtents()Gets the number of extents. -
compareTo
Sorted ascending. By:- physicalVolume
- firstLogicalExtent
- firstPhysicalExtent
- extents
- Specified by:
compareToin interfaceComparable<PhysicalVolumeConfiguration>
-
overlaps
Returns true if either the logical or the physical extents overlap.
-
