Package com.io7m.waxmill.database.vanilla.internal

# Class WXMVirtualMachineDatabase

java.lang.Object
com.io7m.waxmill.database.vanilla.internal.WXMVirtualMachineDatabase

All Implemented Interfaces:
  `WXMDatabaseType`, `WXMVirtualMachineDatabaseType`, `java.lang.AutoCloseable`

    public final class WXMVirtualMachineDatabase
    extends java.lang.Object
    implements WXMVirtualMachineDatabaseType

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `void` | `close()` |
  `static WXMVirtualMachineDatabaseType` | `open​(WXMMachineMessages inMachineMessages, WXMVirtualMachineParserProviderType inParsers, WXMVirtualMachineSerializerProviderType inSerializers, WXMDatabaseConfiguration configuration)` |
  `java.lang.String` | `toString()` |
  `void` | `vmDefineAll​(WXMVirtualMachineSet machines)` | Define a set of new virtual machines.
  `void` | `vmDelete​(java.util.UUID id)` | Delete a virtual machine.
  `java.util.Optional<WXMVirtualMachine>` | `vmGet​(java.util.UUID machineId)` | Find an existing virtual machine with the given ID.
  `WXMVirtualMachineSet` | `vmList()` |
  `void` | `vmUpdate​(WXMVirtualMachine machine)` | Update an existing virtual machine.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.io7m.waxmill.database.api.WXMVirtualMachineDatabaseType

  `vmDefine`

- ## Method Details

  - ### open

    public static WXMVirtualMachineDatabaseType open​(WXMMachineMessages inMachineMessages, WXMVirtualMachineParserProviderType inParsers, WXMVirtualMachineSerializerProviderType inSerializers, WXMDatabaseConfiguration configuration) throws WXMException
    Throws:
      `WXMException`

  - ### vmGet

    public java.util.Optional<WXMVirtualMachine> vmGet​(java.util.UUID machineId) throws WXMException
    Description copied from interface: `WXMVirtualMachineDatabaseType`
    Find an existing virtual machine with the given ID.
    Specified by:
      `vmGet` in interface `WXMVirtualMachineDatabaseType`
    Parameters:
      `machineId` - The virtual machine ID
    Returns:
      The virtual machine, if any
    Throws:
      `WXMException` - On errors

  - ### vmDefineAll

    public void vmDefineAll​(WXMVirtualMachineSet machines) throws WXMException, WXMExceptionDuplicate
    Description copied from interface: `WXMVirtualMachineDatabaseType`
    Define a set of new virtual machines.
    Specified by:
      `vmDefineAll` in interface `WXMVirtualMachineDatabaseType`
    Parameters:
      `machines` - The virtual machine
    Throws:
      `WXMExceptionDuplicate` - If one or more virtual machines already exist
      `WXMException` - On errors

  - ### vmUpdate

    public void vmUpdate​(WXMVirtualMachine machine) throws WXMException
    Description copied from interface: `WXMVirtualMachineDatabaseType`
    Update an existing virtual machine.
    Specified by:
      `vmUpdate` in interface `WXMVirtualMachineDatabaseType`
    Parameters:
      `machine` - The virtual machine
    Throws:
      `WXMException` - On errors

  - ### vmList

    public WXMVirtualMachineSet vmList() throws WXMException
    Specified by:
      `vmList` in interface `WXMVirtualMachineDatabaseType`
    Returns:
      The available virtual machines
    Throws:
      `WXMException` - On errors

  - ### vmDelete

    public void vmDelete​(java.util.UUID id) throws WXMException
    Description copied from interface: `WXMVirtualMachineDatabaseType`
    Delete a virtual machine.
    Specified by:
      `vmDelete` in interface `WXMVirtualMachineDatabaseType`
    Parameters:
      `id` - The virtual machine ID
    Throws:
      `WXMExceptionNonexistent` - If the virtual machine does not exist
      `WXMException` - On errors

  - ### close

    public void close()
    Specified by:
      `close` in interface `java.lang.AutoCloseable`
    Specified by:
      `close` in interface `WXMDatabaseType`

  - ### toString

    public java.lang.String toString()
    Overrides:
      `toString` in class `java.lang.Object`