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 int
Sorted ascending.final boolean
Performs a deep field-by-field comparison to see if two configurations are identical in every way.final boolean
Performs a deep field-by-field comparison to see if two configurations are identical in every way.abstract long
abstract long
abstract long
final PhysicalVolume
final int
hashCode()
static PhysicalVolumeConfiguration
newInstance
(PhysicalVolume physicalVolume, long firstLogicalExtent, long firstPhysicalExtent, long extents) Creates a new PhysicalVolume of the appropriate type for the provided extents.final boolean
Returns true if either the logical or the physical extents overlap.final String
toString()
-
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() -
getFirstPhysicalExtent
public abstract long getFirstPhysicalExtent() -
getExtents
public abstract long getExtents() -
compareTo
Sorted ascending. By:- physicalVolume
- firstLogicalExtent
- firstPhysicalExtent
- extents
- Specified by:
compareTo
in interfaceComparable<PhysicalVolumeConfiguration>
-
overlaps
Returns true if either the logical or the physical extents overlap.
-