Class WXMZFSFilesystem

java.lang.Object
com.io7m.waxmill.machines.WXMZFSFilesystem
All Implemented Interfaces:
WXMZFSFilesystemType

public final class WXMZFSFilesystem
extends java.lang.Object
implements WXMZFSFilesystemType
A ZFS filesystem.
  • Method Details

    • name

      public java.lang.String name()
      The name of the filesystem. This is the name that would be, for example, passed to zfs create -V name/of/fs.
      Specified by:
      name in interface WXMZFSFilesystemType
      Returns:
      The name of the filesystem
    • mountPoint

      public java.nio.file.Path mountPoint()
      The path at which the filesystem is mounted.
      Specified by:
      mountPoint in interface WXMZFSFilesystemType
      Returns:
      The filesystem mount point
    • withName

      public final WXMZFSFilesystem withName​(java.lang.String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name
      Returns:
      A modified copy of the this object
    • withMountPoint

      public final WXMZFSFilesystem withMountPoint​(java.nio.file.Path value)
      Copy the current immutable object by setting a value for the mountPoint attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for mountPoint
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals​(java.lang.Object another)
      This instance is equal to all instances of WXMZFSFilesystem that have equal attribute values.
      Overrides:
      equals in class java.lang.Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: name, mountPoint.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      hashCode value
    • toString

      public java.lang.String toString()
      Prints the immutable value WXMZFSFilesystem with attribute values.
      Overrides:
      toString in class java.lang.Object
      Returns:
      A string representation of the value
    • copyOf

      public static WXMZFSFilesystem copyOf​(WXMZFSFilesystemType instance)
      Creates an immutable copy of a WXMZFSFilesystemType value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable WXMZFSFilesystem instance
    • builder

      public static WXMZFSFilesystem.Builder builder()
      Creates a builder for WXMZFSFilesystem.
       WXMZFSFilesystem.builder()
          .setName(String) // required name
          .setMountPoint(java.nio.file.Path) // required mountPoint
          .build();
       
      Returns:
      A new WXMZFSFilesystem builder